diff options
Diffstat (limited to 'src/controllers/Plugins.class.php')
-rw-r--r-- | src/controllers/Plugins.class.php | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/controllers/Plugins.class.php b/src/controllers/Plugins.class.php index e2b500c..2ed6e7a 100644 --- a/src/controllers/Plugins.class.php +++ b/src/controllers/Plugins.class.php @@ -2,13 +2,15 @@ require_once('Login.class.php'); require_once('Plugin.class.php'); require_once('PluginManager.class.php'); +require_once('Auth.class.php'); +require_once('Database.class.php'); Router::register('plugins', 'Plugins'); class Plugins extends Controller { public function index($routed, $remainder) { $uid = Login::isLoggedIn(); - if ($uid===false || !Auth::getObj($uid)->isAdmin()) { + if ($uid===false || !Auth::getInstance($uid)->isAdmin()) { $this->http401($routed, $remainder); return; } @@ -25,8 +27,7 @@ class Plugins extends Controller { } private function update() { - global $mm; - $db = $mm->database(); + $db = Database::getInstance(); if (isset($_POST['plugins'])) { $string = $db->arrayToValue($_POST['plugins']); @@ -45,7 +46,7 @@ class Plugins extends Controller { } private function show_index() { - global $mm; $pm = $mm->pluginManager(); + $pm = PluginManager::getInstance(); $all_plugins = $pm->listPlugins(); $enabled_plugins = $pm->getActivePlugins(); |