diff options
author | Luke Shumaker <LukeShu@sbcglobal.net> | 2011-10-27 19:51:48 -0400 |
---|---|---|
committer | Luke Shumaker <LukeShu@sbcglobal.net> | 2011-10-27 19:51:48 -0400 |
commit | 2d7a47a99be783c1933af0b24978dc2bbdfe9350 (patch) | |
tree | 8eefffd8cf1f3db2ce6efcb8e50846c943e6df61 /src/controllers/Plugins.class.php | |
parent | db4376c0c1d5d2ea72696e6d73b469cb2dc30b91 (diff) | |
parent | 29a3ffb99435827d5a7ea6886ac22bd2ee18d593 (diff) |
Merge branch 'master' into multiuser-viewmultiuser-view
Conflicts:
src/controllers/Users.class.php
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(); |