From 510377d2cb4b12d1a421e8a88bd7edb86f223451 Mon Sep 17 00:00:00 2001 From: ArthurHoaro Date: Tue, 12 Jan 2016 19:50:48 +0100 Subject: Introduce the Updater class which * contains methods designed to be run once. * is able to upgrade the datastore or the configuration. * is based on methods names, stored in a text file with ';' separator (updates.txt). * begins with existing function 'mergeDeprecatedConfigFile()' (options.php). --- application/Config.php | 27 --------------------------- 1 file changed, 27 deletions(-) (limited to 'application/Config.php') diff --git a/application/Config.php b/application/Config.php index 9af5a535..05a59452 100644 --- a/application/Config.php +++ b/application/Config.php @@ -173,33 +173,6 @@ function load_plugin_parameter_values($plugins, $config) return $out; } -/** - * Milestone 0.9 - shaarli/Shaarli#41: options.php is not supported anymore. - * ==> if user is loggedIn, merge its content with config.php, then delete options.php. - * - * @param array $config contains all configuration fields. - * @param bool $isLoggedIn true if user is logged in. - * - * @return void - */ -function mergeDeprecatedConfig($config, $isLoggedIn) -{ - $config_file = $config['config']['CONFIG_FILE']; - - if (is_file($config['config']['DATADIR'].'/options.php') && $isLoggedIn) { - include $config['config']['DATADIR'].'/options.php'; - - // Load GLOBALS into config - foreach ($GLOBALS as $key => $value) { - $config[$key] = $value; - } - $config['config']['CONFIG_FILE'] = $config_file; - writeConfig($config, $isLoggedIn); - - unlink($config['config']['DATADIR'].'/options.php'); - } -} - /** * Exception used if a mandatory field is missing in given configuration. */ -- cgit v1.2.3