diff options
author | Arthur <arthur@hoa.ro> | 2016-02-15 20:36:42 +0100 |
---|---|---|
committer | Arthur <arthur@hoa.ro> | 2016-02-15 20:36:42 +0100 |
commit | 854ea372553d6ef8174cae320801e5ff3a101a87 (patch) | |
tree | da9185d7c5d733219ca4638b512b18f2d9a55174 /application/Config.php | |
parent | 2865118ca44661c7535aaf7b83e3b9222bc1f9a6 (diff) | |
parent | 510377d2cb4b12d1a421e8a88bd7edb86f223451 (diff) | |
download | Shaarli-854ea372553d6ef8174cae320801e5ff3a101a87.tar.gz Shaarli-854ea372553d6ef8174cae320801e5ff3a101a87.tar.zst Shaarli-854ea372553d6ef8174cae320801e5ff3a101a87.zip |
Merge pull request #442 from ArthurHoaro/updater
Introduce the Updater class which
Diffstat (limited to 'application/Config.php')
-rw-r--r-- | application/Config.php | 27 |
1 files changed, 0 insertions, 27 deletions
diff --git a/application/Config.php b/application/Config.php index 9af5a535..05a59452 100644 --- a/application/Config.php +++ b/application/Config.php | |||
@@ -174,33 +174,6 @@ function load_plugin_parameter_values($plugins, $config) | |||
174 | } | 174 | } |
175 | 175 | ||
176 | /** | 176 | /** |
177 | * Milestone 0.9 - shaarli/Shaarli#41: options.php is not supported anymore. | ||
178 | * ==> if user is loggedIn, merge its content with config.php, then delete options.php. | ||
179 | * | ||
180 | * @param array $config contains all configuration fields. | ||
181 | * @param bool $isLoggedIn true if user is logged in. | ||
182 | * | ||
183 | * @return void | ||
184 | */ | ||
185 | function mergeDeprecatedConfig($config, $isLoggedIn) | ||
186 | { | ||
187 | $config_file = $config['config']['CONFIG_FILE']; | ||
188 | |||
189 | if (is_file($config['config']['DATADIR'].'/options.php') && $isLoggedIn) { | ||
190 | include $config['config']['DATADIR'].'/options.php'; | ||
191 | |||
192 | // Load GLOBALS into config | ||
193 | foreach ($GLOBALS as $key => $value) { | ||
194 | $config[$key] = $value; | ||
195 | } | ||
196 | $config['config']['CONFIG_FILE'] = $config_file; | ||
197 | writeConfig($config, $isLoggedIn); | ||
198 | |||
199 | unlink($config['config']['DATADIR'].'/options.php'); | ||
200 | } | ||
201 | } | ||
202 | |||
203 | /** | ||
204 | * Exception used if a mandatory field is missing in given configuration. | 177 | * Exception used if a mandatory field is missing in given configuration. |
205 | */ | 178 | */ |
206 | class MissingFieldConfigException extends Exception | 179 | class MissingFieldConfigException extends Exception |