diff options
author | Luke Shumaker <LukeShu@sbcglobal.net> | 2011-09-05 01:22:27 -0400 |
---|---|---|
committer | Luke Shumaker <LukeShu@sbcglobal.net> | 2011-09-05 01:22:27 -0400 |
commit | 570901ba4e526be37afd0cbbe018cb0500a7cda1 (patch) | |
tree | 81f13e66cfd795141cac216fd2af610e877a1a31 /src/lib/PluginManager.class.php | |
parent | ad4a7ff9159c2c64cea98d7189f46fa7d6174fc2 (diff) |
Refactor a bit
* move a lot of stuff out of MessageManager
* move models from lib to models
Diffstat (limited to 'src/lib/PluginManager.class.php')
-rw-r--r-- | src/lib/PluginManager.class.php | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/lib/PluginManager.class.php b/src/lib/PluginManager.class.php index 22d7b0c..417eecc 100644 --- a/src/lib/PluginManager.class.php +++ b/src/lib/PluginManager.class.php @@ -7,13 +7,13 @@ class PluginManager { * Return an instance of the plugin with $plugin_name */ public function loadPlugin($plugin_name) { - global $mm; + global $mm; $db = $mm->database(); require_once("$plugin_name.class.php"); $obj = new $plugin_name; $params = call_user_func("$plugin_name::configList"); foreach ($params as $param => $type) { - $value = $mm->getPluginConf($plugin_name, $param); + $value = $db->getPluginConf($plugin_name, $param); if ($value!==false) { switch ($type) { case 'text': @@ -52,18 +52,18 @@ class PluginManager { * Return an array of enabled plugin names. */ public function getActivePlugins() { - global $mm; - $string = $mm->getSysConf('plugins'); - return $mm->valueToArray($string); + global $mm; $db = $mm->database(); + $string = $db->getSysConf('plugins'); + return $db->valueToArray($string); } /** * Set the enabled plugins. */ public function setActivePlugins($plugins) { - global $mm; - $string = $mm->arrayToValue($plugins); - return $mm->setSysConf('plugins', $string); + global $mm; $db = $mm->database(); + $string = $db->arrayToValue($plugins); + return $db->setSysConf('plugins', $string); } /** |