/** * setActivePlugins * * @param array $pPluginGuids an array of all the plugin guids that are active. Any left out are *inactive*! * @access public * @return TRUE on success, FALSE on failure - mErrors will contain reason for failure */ function setActivePlugins($pPluginGuids) { global $gBitSystem; if (is_array($pPluginGuids)) { // zap list of plugins from DB $gBitSystem->storeConfigMatch("/^{$this->mSystem}_plugin_status/i", NULL, 'n', LIBERTY_PKG_NAME); foreach (array_keys($this->mPlugins) as $guid) { $this->mPlugins[$guid]['is_active'] = 'n'; } // set active those specified foreach (array_keys($pPluginGuids) as $guid) { if ($pPluginGuids[$guid][0] == 'y') { $this->setActivePlugin($guid); } } // load any plugins made active, but not already loaded $this->loadActivePlugins(); // finally we need to remove all cache files since the content has been changed LibertyContent::expungeCache(); } }