I can register a beta feature in this hook that is not in $wgBetaFeaturesWhitelist but it still shows when I visit Special:Preferences despite not working.
Expected:
When a feature is not whitelisted it should not show up in beta features.
I can register a beta feature in this hook that is not in $wgBetaFeaturesWhitelist but it still shows when I visit Special:Preferences despite not working.
Expected:
When a feature is not whitelisted it should not show up in beta features.
Subject | Repo | Branch | Lines +/- | |
---|---|---|---|---|
BetaFeatures only add whitelisted preferences | mediawiki/extensions/BetaFeatures | master | +17 -15 |
if ( is_array( $wgBetaFeaturesWhitelist ) && !in_array( $key, $wgBetaFeaturesWhitelist ) ) { $success = false; } elseif ( isset( $depHooks[$key] ) ) { $success = Hooks::run( $depHooks[$key] ); } if ( $success !== true ) { // Skip this preference! continue; }
Thoughts as to why this doesn't work any more appreciated.
The above block is encolsed in
if ( isset( $info['dependent'] ) && $info['dependent'] === true ) {
Clearly, if dependencies are not given, whitelist check is completely bypassed.
Change 258418 had a related patch set uploaded (by Sumit):
BetaFeatures only add whitelisted preferences