MarkTraceur has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/73920


Change subject: Add beta preferences section and more
......................................................................

Add beta preferences section and more

Now beta features can have subpreferences in the preferences section.

Broken: If there are no "real" preferences, the beta section still shows
up. I'll submit a core patch to fix that posthaste.

Change-Id: I7cafe97e448e2f5649d93874780751e9a3063e3a
---
M BetaFeaturesHooks.php
1 file changed, 9 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/BetaFeatures 
refs/changes/20/73920/1

diff --git a/BetaFeaturesHooks.php b/BetaFeaturesHooks.php
index 912ab62..67098e7 100644
--- a/BetaFeaturesHooks.php
+++ b/BetaFeaturesHooks.php
@@ -26,12 +26,21 @@
                foreach ( $betaPrefs as $key => $info ) {
                        $opt = array(
                                'type' => 'hidden',
+                               'section' => 'beta',
                        );
 
                        if ( array_key_exists( 'label-message', $info ) ) {
                                $opt['label-message'] = $info['label-message'];
                        }
 
+                       if ( array_key_exists( 'section', $info ) ) {
+                               $opt['section'] = 'beta/' + $info['section'];
+                       }
+
+                       if ( array_key_exists( 'type', $info ) ) {
+                               $opt['type'] = $info['type'];
+                       }
+
                        $prefs['beta-feature-' . $key] = $opt;
                }
 

-- 
To view, visit https://gerrit.wikimedia.org/r/73920
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I7cafe97e448e2f5649d93874780751e9a3063e3a
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/BetaFeatures
Gerrit-Branch: master
Gerrit-Owner: MarkTraceur <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to