summaryrefslogtreecommitdiff
path: root/src/lib/PluginManager.class.php
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/PluginManager.class.php')
-rw-r--r--src/lib/PluginManager.class.php16
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);
}
/**