aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormarcus <marcus@36083f99-b078-4883-b0ff-0f9b5a30f544>2009-04-02 08:55:14 +0000
committermarcus <marcus@36083f99-b078-4883-b0ff-0f9b5a30f544>2009-04-02 08:55:14 +0000
commit6b0c20521ab50af0de0cc00d1440f64263dc6e5a (patch)
tree4dfcecd95654b673adad92eae8990d1b0722c6a0
parent5f029ee36ac96cf13d33c787258af85959b95170 (diff)
downloadelgg-6b0c20521ab50af0de0cc00d1440f64263dc6e5a.tar.gz
elgg-6b0c20521ab50af0de0cc00d1440f64263dc6e5a.tar.bz2
Closes #945: enable/disable_plugin now updates $ENABLED_PLUGINS_CACHE
git-svn-id: https://code.elgg.org/elgg/trunk@3186 36083f99-b078-4883-b0ff-0f9b5a30f544
-rw-r--r--engine/lib/plugins.php10
1 files changed, 6 insertions, 4 deletions
diff --git a/engine/lib/plugins.php b/engine/lib/plugins.php
index 2986b65e5..0a373457e 100644
--- a/engine/lib/plugins.php
+++ b/engine/lib/plugins.php
@@ -590,7 +590,7 @@
*/
function enable_plugin($plugin, $site_guid = 0)
{
- global $CONFIG;
+ global $CONFIG, $ENABLED_PLUGINS_CACHE;
$plugin = sanitise_string($plugin);
$site_guid = (int) $site_guid;
@@ -613,7 +613,8 @@
$new_enabled[] = $plugin;
$new_enabled = array_unique($new_enabled);
- $return = $site->setMetaData('enabled_plugins', $new_enabled);
+ $return = $site->setMetaData('enabled_plugins', $new_enabled);
+ $ENABLED_PLUGINS_CACHE = $new_enabled;
return $return;
}
@@ -626,7 +627,7 @@
*/
function disable_plugin($plugin, $site_guid = 0)
{
- global $CONFIG;
+ global $CONFIG, $ENABLED_PLUGINS_CACHE;
$plugin = sanitise_string($plugin);
$site_guid = (int) $site_guid;
@@ -644,7 +645,8 @@
if ($plugin != $plug)
$new_enabled[] = $plug;
- $return = $site->setMetaData('enabled_plugins', $new_enabled);
+ $return = $site->setMetaData('enabled_plugins', $new_enabled);
+ $ENABLED_PLUGINS_CACHE = $new_enabled;
return $return;
}