/** * @param String $pluginId * @param String $options */ public function _savePluginConfig($pluginId, $options) { $jsonData = CoreConfLoader::getBootstrapConf(); if (!is_array($jsonData)) { $jsonData = array(); } $jsonData[$pluginId] = $options; if ($pluginId == "core.conf" || $pluginId == "core.auth" || $pluginId == "core.cache") { $testKey = $pluginId == "core.conf" || $pluginId == "core.cache" ? "UNIQUE_INSTANCE_CONFIG" : "MASTER_INSTANCE_CONFIG"; $current = array(); $this->_loadPluginConfig($pluginId, $current); if (isset($current[$testKey]["instance_name"]) && $current[$testKey]["instance_name"] != $options[$testKey]["instance_name"]) { $forceDisconnexion = $pluginId; } } CoreConfLoader::saveBootstrapConf($jsonData); if (isset($forceDisconnexion)) { if ($pluginId == "core.conf") { // DISCONNECT AuthService::disconnect(); } else { if ($pluginId == "core.auth") { // DELETE admin_counted file and DISCONNECT @unlink(AJXP_CACHE_DIR . "/admin_counted"); } } } }