http://www.mediawiki.org/wiki/Special:Code/MediaWiki/93757

Revision: 93757
Author:   erik
Date:     2011-08-02 14:52:43 +0000 (Tue, 02 Aug 2011)
Log Message:
-----------
1) commit WMF hack that makes it possible to hide the "New features" link
2) disable "New features" link by default since nobody actually needs it

ArticleFeedback depends on SimpleSurvey which depends on PrefSwitch,
which means that anyone installing ArticleFeedback was getting the
"New features" link by default. (It shouldn't really depend on 
PrefSwitch at all.)

Modified Paths:
--------------
    trunk/extensions/PrefSwitch/PrefSwitch.hooks.php
    trunk/extensions/PrefSwitch/PrefSwitch.php

Modified: trunk/extensions/PrefSwitch/PrefSwitch.hooks.php
===================================================================
--- trunk/extensions/PrefSwitch/PrefSwitch.hooks.php    2011-08-02 14:44:57 UTC 
(rev 93756)
+++ trunk/extensions/PrefSwitch/PrefSwitch.hooks.php    2011-08-02 14:52:43 UTC 
(rev 93757)
@@ -42,7 +42,10 @@
         * PersonalUrls hook
         */
        public static function personalUrls( &$personal_urls, &$title ) {
-               global $wgUser, $wgRequest;
+               global $wgUser, $wgRequest, $wgPrefSwitchShowLinks;
+               if(!$wgPrefSwitchShowLinks) {
+                       return true;            
+               }
                
                // Figure out the orgin to include in the link
                $fromquery = array();

Modified: trunk/extensions/PrefSwitch/PrefSwitch.php
===================================================================
--- trunk/extensions/PrefSwitch/PrefSwitch.php  2011-08-02 14:44:57 UTC (rev 
93756)
+++ trunk/extensions/PrefSwitch/PrefSwitch.php  2011-08-02 14:52:43 UTC (rev 
93757)
@@ -15,6 +15,9 @@
 
 $wgPrefSwitchStyleVersion = 1;
 
+// Set this to true to show the "New features" link in the top bar
+$wgPrefSwitchShowLinks = false;
+
 // Preferences to set when users switch prefs
 $wgPrefSwitchPrefs = array(
        'off' => array(


_______________________________________________
MediaWiki-CVS mailing list
MediaWiki-CVS@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs

Reply via email to