aboutsummaryrefslogtreecommitdiffhomepage
path: root/application/config/ConfigPhp.php
diff options
context:
space:
mode:
authorArthurHoaro <arthur@hoa.ro>2016-05-29 16:10:32 +0200
committerArthurHoaro <arthur@hoa.ro>2016-06-11 09:30:56 +0200
commitda10377b3c263d96a46cf9101c202554343d2cd0 (patch)
treed91d1fcdbd79367418007add4d135d3f84e57a04 /application/config/ConfigPhp.php
parenteeea1c3daa87f133c57c96fa17ed26b02c392636 (diff)
downloadShaarli-da10377b3c263d96a46cf9101c202554343d2cd0.tar.gz
Shaarli-da10377b3c263d96a46cf9101c202554343d2cd0.tar.zst
Shaarli-da10377b3c263d96a46cf9101c202554343d2cd0.zip
Rename configuration keys and fix GLOBALS in templates
Diffstat (limited to 'application/config/ConfigPhp.php')
-rw-r--r--application/config/ConfigPhp.php45
1 files changed, 45 insertions, 0 deletions
diff --git a/application/config/ConfigPhp.php b/application/config/ConfigPhp.php
index f99073af..b122f4f1 100644
--- a/application/config/ConfigPhp.php
+++ b/application/config/ConfigPhp.php
@@ -24,6 +24,51 @@ class ConfigPhp implements ConfigIO
24 ); 24 );
25 25
26 /** 26 /**
27 * Map legacy config keys with the new ones.
28 * If ConfigPhp is used, getting <newkey> will actually look for <legacykey>.
29 * The Updater will use this array to transform keys when switching to JSON.
30 *
31 * @var array current key => legacy key.
32 */
33 public static $LEGACY_KEYS_MAPPING = array(
34 'credentials.login' => 'login',
35 'credentials.hash' => 'hash',
36 'credentials.salt' => 'salt',
37 'path.data_dir' => 'config.DATADIR',
38 'path.config' => 'config.CONFIG_FILE',
39 'path.datastore' => 'config.DATASTORE',
40 'path.updates' => 'config.UPDATES_FILE',
41 'path.log' => 'config.LOG_FILE',
42 'path.update_check' => 'config.UPDATECHECK_FILENAME',
43 'path.raintpl_tpl' => 'config.RAINTPL_TPL',
44 'path.raintpl_tmp' => 'config.RAINTPL_TMP',
45 'path.thumbnails_cache' => 'config.CACHEDIR',
46 'path.page_cache' => 'config.PAGECACHE',
47 'path.ban_file' => 'config.IPBANS_FILENAME',
48 'security.session_protection_disabled' => 'disablesessionprotection',
49 'security.ban_after' => 'config.BAN_AFTER',
50 'security.ban_duration' => 'config.BAN_DURATION',
51 'general.title' => 'title',
52 'general.timezone' => 'timezone',
53 'general.header_link' => 'titleLink',
54 'general.check_updates' => 'config.ENABLE_UPDATECHECK',
55 'general.check_updates_branch' => 'config.UPDATECHECK_BRANCH',
56 'general.check_updates_interval' => 'config.UPDATECHECK_INTERVAL',
57 'general.default_private_links' => 'privateLinkByDefault',
58 'general.rss_permalinks' => 'config.ENABLE_RSS_PERMALINKS',
59 'general.links_per_page' => 'config.LINKS_PER_PAGE',
60 'general.enable_thumbnails' => 'config.ENABLE_THUMBNAILS',
61 'general.enable_localcache' => 'config.ENABLE_LOCALCACHE',
62 'general.enabled_plugins' => 'config.ENABLED_PLUGINS',
63 'extras.redirector' => 'redirector',
64 'extras.redirector_encode_url' => 'config.REDIRECTOR_URLENCODE',
65 'extras.show_atom' => 'config.SHOW_ATOM',
66 'extras.hide_public_links' => 'config.HIDE_PUBLIC_LINKS',
67 'extras.hide_timestamps' => 'config.HIDE_TIMESTAMPS',
68 'extras.open_shaarli' => 'config.OPEN_SHAARLI',
69 );
70
71 /**
27 * @inheritdoc 72 * @inheritdoc
28 */ 73 */
29 function read($filepath) 74 function read($filepath)