From 6b0c20521ab50af0de0cc00d1440f64263dc6e5a Mon Sep 17 00:00:00 2001 From: marcus Date: Thu, 2 Apr 2009 08:55:14 +0000 Subject: 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 --- engine/lib/plugins.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'engine') 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; } -- cgit v1.2.3