Support admin controller and view over plugins

This commit is contained in:
dignajar 2020-06-15 16:27:12 +02:00
parent 537cfbf616
commit b092d3048a
2 changed files with 7 additions and 6 deletions

View file

@ -1,9 +1,10 @@
<?php defined('BLUDIT') or die('Bludit CMS.');
// Session
// Start the session
// If the session is not possible to start the admin area is not available
Session::start();
if (Session::started()===false) {
exit('Bludit CMS. Session initialization failure.');
exit('Bludit CMS. Session initialization failed.');
}
$login = new Login();
@ -83,7 +84,7 @@ else
// Load controller.
if (Sanitize::pathFile(PATH_ADMIN_CONTROLLERS, $layout['controller'].'.php')) {
include(PATH_ADMIN_CONTROLLERS.$layout['controller'].'.php');
} else if(!empty($layout['plugin']) && method_exists($layout['plugin'], 'adminController')) {
} elseif ($layout['plugin'] && method_exists($layout['plugin'], 'adminController')) {
$layout['plugin']->adminController();
}