Custom admin pages
This commit is contained in:
parent
a5dc0addea
commit
7ea717200c
|
@ -80,6 +80,8 @@
|
||||||
<?php
|
<?php
|
||||||
if (Sanitize::pathFile(PATH_ADMIN_VIEWS, $layout['view'].'.php')) {
|
if (Sanitize::pathFile(PATH_ADMIN_VIEWS, $layout['view'].'.php')) {
|
||||||
include(PATH_ADMIN_VIEWS.$layout['view'].'.php');
|
include(PATH_ADMIN_VIEWS.$layout['view'].'.php');
|
||||||
|
} else if (isset($plugin) && method_exists($plugin, "adminView")) {
|
||||||
|
echo $plugin->adminView();
|
||||||
} else {
|
} else {
|
||||||
echo '<h1 class="text-center">'.$L->g('Page not found').'</h1>';
|
echo '<h1 class="text-center">'.$L->g('Page not found').'</h1>';
|
||||||
echo '<h2 class="text-center">'.$L->g('Choose a page from the sidebar.').'</h2>';
|
echo '<h2 class="text-center">'.$L->g('Choose a page from the sidebar.').'</h2>';
|
||||||
|
|
|
@ -77,6 +77,10 @@ else
|
||||||
// Load controller.
|
// Load controller.
|
||||||
if (Sanitize::pathFile(PATH_ADMIN_CONTROLLERS, $layout['controller'].'.php')) {
|
if (Sanitize::pathFile(PATH_ADMIN_CONTROLLERS, $layout['controller'].'.php')) {
|
||||||
include(PATH_ADMIN_CONTROLLERS.$layout['controller'].'.php');
|
include(PATH_ADMIN_CONTROLLERS.$layout['controller'].'.php');
|
||||||
|
} else if (($plugin = getPlugin($layout['controller'])) !== false) {
|
||||||
|
if (method_exists($plugin, "adminController") && method_exists($plugin, "adminView")) {
|
||||||
|
$plugin->adminController();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Load view and theme.
|
// Load view and theme.
|
||||||
|
|
Loading…
Reference in New Issue