Local configuration negation #1158
Conversation
This applies to: - acronyms - entities - interwiki - mime - smileys
To negate a config value, prefix the value with an '!'. E.g. to disable recognition of the gopher scheme !gopher This applies to: - scheme - stopwords
So basically this means that you cannot set any of the configuration values to 0 anymore. I'm not sure if this is useful/if we should keep this possibility. Apart from that: |
(not other values which PHP evaluates to false)
patch pushed to address @michitux concern. also to make negation using '!' resistant to white space differences. |
The inspection completed: No new issues |
@@ -196,7 +208,7 @@ function confToHash($file,$lower=false) { | |||
* @param array $params optional additional params to pass to the callback | |||
* @return array configuration values | |||
*/ | |||
function retrieveConfig($type,$fn,$params=null) { | |||
function retrieveConfig($type,$fn,$params=null,$combine='array_merge') { |
splitbrain
May 19, 2015
Owner
the doc block should be adjusted for the new paramter
the doc block should be adjusted for the new paramter
This means we can no longer have entities starting with a
|
No. Entities are key/value conf., so are cleared by putting no value Only scheme and stopwords are single value, so needed a different
|
ah. good to merge then :-) |
Local configuration negation
Needs still an update of the docs |
Allows (non-php) configuration values set earlier in the config cascade to be reversed. E.g. to counter a default configuration value.
For key/value config files (e.g. acronyms), include a key with no value
For value only config files (e.g. scheme, stopwords), prefix the value with an exclamation mark, '!'.