aboutsummaryrefslogtreecommitdiffhomepage
path: root/application/config
diff options
context:
space:
mode:
authorArthurHoaro <arthur@hoa.ro>2016-06-11 09:08:02 +0200
committerArthurHoaro <arthur@hoa.ro>2016-06-11 09:30:56 +0200
commit894a3c4bf38d8dcadb6941049b9167e5101805bd (patch)
tree6e158c07f620fced157dba0a51638590814b50bc /application/config
parent51def0d84955c7a951bd091eb5eeb3fce9deabd4 (diff)
downloadShaarli-894a3c4bf38d8dcadb6941049b9167e5101805bd.tar.gz
Shaarli-894a3c4bf38d8dcadb6941049b9167e5101805bd.tar.zst
Shaarli-894a3c4bf38d8dcadb6941049b9167e5101805bd.zip
Rename configuration key for better sections
Diffstat (limited to 'application/config')
-rw-r--r--application/config/ConfigManager.php58
-rw-r--r--application/config/ConfigPhp.php48
2 files changed, 55 insertions, 51 deletions
diff --git a/application/config/ConfigManager.php b/application/config/ConfigManager.php
index 5aafc89d..ff41772a 100644
--- a/application/config/ConfigManager.php
+++ b/application/config/ConfigManager.php
@@ -186,8 +186,8 @@ class ConfigManager
186 'general.timezone', 186 'general.timezone',
187 'general.title', 187 'general.title',
188 'general.header_link', 188 'general.header_link',
189 'general.default_private_links', 189 'privacy.default_private_links',
190 'extras.redirector', 190 'redirector.url',
191 ); 191 );
192 192
193 // Only logged in user can alter config. 193 // Only logged in user can alter config.
@@ -287,39 +287,43 @@ class ConfigManager
287 */ 287 */
288 protected function setDefaultValues() 288 protected function setDefaultValues()
289 { 289 {
290 $this->setEmpty('path.data_dir', 'data'); 290 $this->setEmpty('resource.data_dir', 'data');
291 $this->setEmpty('path.config', 'data/config.php'); 291 $this->setEmpty('resource.config', 'data/config.php');
292 $this->setEmpty('path.datastore', 'data/datastore.php'); 292 $this->setEmpty('resource.datastore', 'data/datastore.php');
293 $this->setEmpty('path.ban_file', 'data/ipbans.php'); 293 $this->setEmpty('resource.ban_file', 'data/ipbans.php');
294 $this->setEmpty('path.updates', 'data/updates.txt'); 294 $this->setEmpty('resource.updates', 'data/updates.txt');
295 $this->setEmpty('path.log', 'data/log.txt'); 295 $this->setEmpty('resource.log', 'data/log.txt');
296 $this->setEmpty('path.update_check', 'data/lastupdatecheck.txt'); 296 $this->setEmpty('resource.update_check', 'data/lastupdatecheck.txt');
297 $this->setEmpty('path.raintpl_tpl', 'tpl/'); 297 $this->setEmpty('resource.raintpl_tpl', 'tpl/');
298 $this->setEmpty('path.raintpl_tmp', 'tmp/'); 298 $this->setEmpty('resource.raintpl_tmp', 'tmp/');
299 $this->setEmpty('path.thumbnails_cache', 'cache'); 299 $this->setEmpty('resource.thumbnails_cache', 'cache');
300 $this->setEmpty('path.page_cache', 'pagecache'); 300 $this->setEmpty('resource.page_cache', 'pagecache');
301 301
302 $this->setEmpty('security.ban_after', 4); 302 $this->setEmpty('security.ban_after', 4);
303 $this->setEmpty('security.ban_duration', 1800); 303 $this->setEmpty('security.ban_duration', 1800);
304 $this->setEmpty('security.session_protection_disabled', false); 304 $this->setEmpty('security.session_protection_disabled', false);
305 $this->setEmpty('security.open_shaarli', false);
305 306
306 $this->setEmpty('general.check_updates', false);
307 $this->setEmpty('general.rss_permalinks', true);
308 $this->setEmpty('general.links_per_page', 20);
309 $this->setEmpty('general.default_private_links', false);
310 $this->setEmpty('general.enable_thumbnails', true);
311 $this->setEmpty('general.enable_localcache', true);
312 $this->setEmpty('general.check_updates_branch', 'stable');
313 $this->setEmpty('general.check_updates_interval', 86400);
314 $this->setEmpty('general.header_link', '?'); 307 $this->setEmpty('general.header_link', '?');
308 $this->setEmpty('general.links_per_page', 20);
315 $this->setEmpty('general.enabled_plugins', array('qrcode')); 309 $this->setEmpty('general.enabled_plugins', array('qrcode'));
316 310
317 $this->setEmpty('extras.show_atom', false); 311 $this->setEmpty('updates.check_updates', false);
318 $this->setEmpty('extras.hide_public_links', false); 312 $this->setEmpty('updates.check_updates_branch', 'stable');
319 $this->setEmpty('extras.hide_timestamps', false); 313 $this->setEmpty('updates.check_updates_interval', 86400);
320 $this->setEmpty('extras.open_shaarli', false); 314
321 $this->setEmpty('extras.redirector', ''); 315 $this->setEmpty('feed.rss_permalinks', true);
322 $this->setEmpty('extras.redirector_encode_url', true); 316 $this->setEmpty('feed.show_atom', false);
317
318 $this->setEmpty('privacy.default_private_links', false);
319 $this->setEmpty('privacy.hide_public_links', false);
320 $this->setEmpty('privacy.hide_timestamps', false);
321
322 $this->setEmpty('thumbnail.enable_thumbnails', true);
323 $this->setEmpty('thumbnail.enable_localcache', true);
324
325 $this->setEmpty('redirector.url', '');
326 $this->setEmpty('redirector.encode_url', true);
323 327
324 $this->setEmpty('plugins', array()); 328 $this->setEmpty('plugins', array());
325 } 329 }
diff --git a/application/config/ConfigPhp.php b/application/config/ConfigPhp.php
index b122f4f1..27187b66 100644
--- a/application/config/ConfigPhp.php
+++ b/application/config/ConfigPhp.php
@@ -34,38 +34,38 @@ class ConfigPhp implements ConfigIO
34 'credentials.login' => 'login', 34 'credentials.login' => 'login',
35 'credentials.hash' => 'hash', 35 'credentials.hash' => 'hash',
36 'credentials.salt' => 'salt', 36 'credentials.salt' => 'salt',
37 'path.data_dir' => 'config.DATADIR', 37 'resource.data_dir' => 'config.DATADIR',
38 'path.config' => 'config.CONFIG_FILE', 38 'resource.config' => 'config.CONFIG_FILE',
39 'path.datastore' => 'config.DATASTORE', 39 'resource.datastore' => 'config.DATASTORE',
40 'path.updates' => 'config.UPDATES_FILE', 40 'resource.updates' => 'config.UPDATES_FILE',
41 'path.log' => 'config.LOG_FILE', 41 'resource.log' => 'config.LOG_FILE',
42 'path.update_check' => 'config.UPDATECHECK_FILENAME', 42 'resource.update_check' => 'config.UPDATECHECK_FILENAME',
43 'path.raintpl_tpl' => 'config.RAINTPL_TPL', 43 'resource.raintpl_tpl' => 'config.RAINTPL_TPL',
44 'path.raintpl_tmp' => 'config.RAINTPL_TMP', 44 'resource.raintpl_tmp' => 'config.RAINTPL_TMP',
45 'path.thumbnails_cache' => 'config.CACHEDIR', 45 'resource.thumbnails_cache' => 'config.CACHEDIR',
46 'path.page_cache' => 'config.PAGECACHE', 46 'resource.page_cache' => 'config.PAGECACHE',
47 'path.ban_file' => 'config.IPBANS_FILENAME', 47 'resource.ban_file' => 'config.IPBANS_FILENAME',
48 'security.session_protection_disabled' => 'disablesessionprotection', 48 'security.session_protection_disabled' => 'disablesessionprotection',
49 'security.ban_after' => 'config.BAN_AFTER', 49 'security.ban_after' => 'config.BAN_AFTER',
50 'security.ban_duration' => 'config.BAN_DURATION', 50 'security.ban_duration' => 'config.BAN_DURATION',
51 'general.title' => 'title', 51 'general.title' => 'title',
52 'general.timezone' => 'timezone', 52 'general.timezone' => 'timezone',
53 'general.header_link' => 'titleLink', 53 'general.header_link' => 'titleLink',
54 'general.check_updates' => 'config.ENABLE_UPDATECHECK', 54 'updates.check_updates' => 'config.ENABLE_UPDATECHECK',
55 'general.check_updates_branch' => 'config.UPDATECHECK_BRANCH', 55 'updates.check_updates_branch' => 'config.UPDATECHECK_BRANCH',
56 'general.check_updates_interval' => 'config.UPDATECHECK_INTERVAL', 56 'updates.check_updates_interval' => 'config.UPDATECHECK_INTERVAL',
57 'general.default_private_links' => 'privateLinkByDefault', 57 'privacy.default_private_links' => 'privateLinkByDefault',
58 'general.rss_permalinks' => 'config.ENABLE_RSS_PERMALINKS', 58 'feed.rss_permalinks' => 'config.ENABLE_RSS_PERMALINKS',
59 'general.links_per_page' => 'config.LINKS_PER_PAGE', 59 'general.links_per_page' => 'config.LINKS_PER_PAGE',
60 'general.enable_thumbnails' => 'config.ENABLE_THUMBNAILS', 60 'thumbnail.enable_thumbnails' => 'config.ENABLE_THUMBNAILS',
61 'general.enable_localcache' => 'config.ENABLE_LOCALCACHE', 61 'thumbnail.enable_localcache' => 'config.ENABLE_LOCALCACHE',
62 'general.enabled_plugins' => 'config.ENABLED_PLUGINS', 62 'general.enabled_plugins' => 'config.ENABLED_PLUGINS',
63 'extras.redirector' => 'redirector', 63 'redirector.url' => 'redirector',
64 'extras.redirector_encode_url' => 'config.REDIRECTOR_URLENCODE', 64 'redirector.encode_url' => 'config.REDIRECTOR_URLENCODE',
65 'extras.show_atom' => 'config.SHOW_ATOM', 65 'feed.show_atom' => 'config.SHOW_ATOM',
66 'extras.hide_public_links' => 'config.HIDE_PUBLIC_LINKS', 66 'privacy.hide_public_links' => 'config.HIDE_PUBLIC_LINKS',
67 'extras.hide_timestamps' => 'config.HIDE_TIMESTAMPS', 67 'privacy.hide_timestamps' => 'config.HIDE_TIMESTAMPS',
68 'extras.open_shaarli' => 'config.OPEN_SHAARLI', 68 'security.open_shaarli' => 'config.OPEN_SHAARLI',
69 ); 69 );
70 70
71 /** 71 /**