diff options
author | Aurélien Tamisier <virtualtam+github@flibidi.net> | 2018-12-02 22:47:41 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-12-02 22:47:41 +0100 |
commit | 1004742f09b55ff781c13745781b9a7e90986faa (patch) | |
tree | aa0e5743390296441edf09f44f95b3d21f2b5a16 /application/config | |
parent | 5e0a898bb13fad528514b0d33763bcaae38b45b0 (diff) | |
parent | 9d9f6d75b94aab51067bdfbe50b58b66d1194f6d (diff) | |
download | Shaarli-1004742f09b55ff781c13745781b9a7e90986faa.tar.gz Shaarli-1004742f09b55ff781c13745781b9a7e90986faa.tar.zst Shaarli-1004742f09b55ff781c13745781b9a7e90986faa.zip |
Merge pull request #1234 from virtualtam/lint
Setup PHPCS and cleanup linter configuration
Diffstat (limited to 'application/config')
-rw-r--r-- | application/config/ConfigPhp.php | 12 | ||||
-rw-r--r-- | application/config/ConfigPlugin.php | 3 |
2 files changed, 11 insertions, 4 deletions
diff --git a/application/config/ConfigPhp.php b/application/config/ConfigPhp.php index 8add8bcd..9625fe1a 100644 --- a/application/config/ConfigPhp.php +++ b/application/config/ConfigPhp.php | |||
@@ -104,12 +104,20 @@ class ConfigPhp implements ConfigIO | |||
104 | 104 | ||
105 | // Store all $conf['config'] | 105 | // Store all $conf['config'] |
106 | foreach ($conf['config'] as $key => $value) { | 106 | foreach ($conf['config'] as $key => $value) { |
107 | $configStr .= '$GLOBALS[\'config\'][\''. $key .'\'] = '.var_export($conf['config'][$key], true).';'. PHP_EOL; | 107 | $configStr .= '$GLOBALS[\'config\'][\'' |
108 | . $key | ||
109 | .'\'] = ' | ||
110 | .var_export($conf['config'][$key], true).';' | ||
111 | . PHP_EOL; | ||
108 | } | 112 | } |
109 | 113 | ||
110 | if (isset($conf['plugins'])) { | 114 | if (isset($conf['plugins'])) { |
111 | foreach ($conf['plugins'] as $key => $value) { | 115 | foreach ($conf['plugins'] as $key => $value) { |
112 | $configStr .= '$GLOBALS[\'plugins\'][\''. $key .'\'] = '.var_export($conf['plugins'][$key], true).';'. PHP_EOL; | 116 | $configStr .= '$GLOBALS[\'plugins\'][\'' |
117 | . $key | ||
118 | .'\'] = ' | ||
119 | .var_export($conf['plugins'][$key], true).';' | ||
120 | . PHP_EOL; | ||
113 | } | 121 | } |
114 | } | 122 | } |
115 | 123 | ||
diff --git a/application/config/ConfigPlugin.php b/application/config/ConfigPlugin.php index b3d9752b..dbb24937 100644 --- a/application/config/ConfigPlugin.php +++ b/application/config/ConfigPlugin.php | |||
@@ -34,8 +34,7 @@ function save_plugin_config($formData) | |||
34 | // If there is no order, it means a disabled plugin has been enabled. | 34 | // If there is no order, it means a disabled plugin has been enabled. |
35 | if (isset($formData['order_' . $key])) { | 35 | if (isset($formData['order_' . $key])) { |
36 | $plugins[(int) $formData['order_' . $key]] = $key; | 36 | $plugins[(int) $formData['order_' . $key]] = $key; |
37 | } | 37 | } else { |
38 | else { | ||
39 | $newEnabledPlugins[] = $key; | 38 | $newEnabledPlugins[] = $key; |
40 | } | 39 | } |
41 | } | 40 | } |