mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Gadgets
synced 2024-11-28 01:00:02 +00:00
Avoid adding hidden gadgets in default options
Hidden gadgets do not have associated user preferences. Adding them to $defaultOptions only causes them to be unnecessarily exported in mw.user.options. Bug: T299071 Change-Id: Ic55e7f2a9daa405cddd0189de3d32f5825bc336a
This commit is contained in:
parent
2d1f320e23
commit
43efda4f96
|
@ -73,7 +73,10 @@ class GadgetHooks {
|
|||
*/
|
||||
foreach ( $gadgets as $thisSection ) {
|
||||
foreach ( $thisSection as $gadgetId => $gadget ) {
|
||||
$defaultOptions['gadget-' . $gadgetId] = $gadget->isOnByDefault() ? 1 : 0;
|
||||
// Hidden gadgets don't need to be added here, T299071
|
||||
if ( !$gadget->isHidden() ) {
|
||||
$defaultOptions['gadget-' . $gadgetId] = $gadget->isOnByDefault() ? 1 : 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue