/** * Intercept CONF and AUTH configs to use the BootConf Storage * @param String $pluginId * @param String $options */ public function savePluginConfig($pluginId, $options) { if ($this->pluginUsesBootConf($pluginId)) { ConfService::getBootConfStorageImpl()->_savePluginConfig($pluginId, $options); } else { $this->_savePluginConfig($pluginId, $options); } }
public static function cleanDibiDriverParameters($params) { if (!is_array($params)) { return $params; } $value = $params["group_switch_value"]; if (isset($value)) { if (isset(self::$_dibiParamClean[$value])) { return self::$_dibiParamClean[$value]; } if ($value == "core") { $bootStorage = ConfService::getBootConfStorageImpl(); $configs = $bootStorage->loadPluginConfig("core", "conf"); $params = $configs["DIBI_PRECONFIGURATION"]; if (!is_array($params)) { throw new Exception("Empty SQL default connexion, there is something wrong with your setup! You may have switch to an SQL-based plugin without defining a connexion."); } } else { unset($params["group_switch_value"]); } foreach ($params as $k => $v) { $explode = explode("_", $k, 2); $params[array_pop($explode)] = AJXP_VarsFilter::filter($v); unset($params[$k]); } } switch ($params["driver"]) { case "sqlite": case "sqlite3": $params["formatDateTime"] = "'Y-m-d H:i:s'"; $params["formatDate"] = "'Y-m-d'"; break; } if (isset($value)) { self::$_dibiParamClean[$value] = $params; } return $params; }