From 570901ba4e526be37afd0cbbe018cb0500a7cda1 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Mon, 5 Sep 2011 01:22:27 -0400 Subject: Refactor a bit * move a lot of stuff out of MessageManager * move models from lib to models --- src/lib/PluginManager.class.php | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'src/lib/PluginManager.class.php') 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); } /** -- cgit v1.2.3-54-g00ecf