r93757 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r93756‎ | r93757 | r93758 >
Date:14:52, 2 August 2011
Author:erik
Status:ok
Tags:
Comment:
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 (modified) (history)
  • /trunk/extensions/PrefSwitch/PrefSwitch.php (modified) (history)

Diff [purge]

Index: trunk/extensions/PrefSwitch/PrefSwitch.php
@@ -15,6 +15,9 @@
1616
1717 $wgPrefSwitchStyleVersion = 1;
1818
 19+// Set this to true to show the "New features" link in the top bar
 20+$wgPrefSwitchShowLinks = false;
 21+
1922 // Preferences to set when users switch prefs
2023 $wgPrefSwitchPrefs = array(
2124 'off' => array(
Index: trunk/extensions/PrefSwitch/PrefSwitch.hooks.php
@@ -42,7 +42,10 @@
4343 * PersonalUrls hook
4444 */
4545 public static function personalUrls( &$personal_urls, &$title ) {
46 - global $wgUser, $wgRequest;
 46+ global $wgUser, $wgRequest, $wgPrefSwitchShowLinks;
 47+ if(!$wgPrefSwitchShowLinks) {
 48+ return true;
 49+ }
4750
4851 // Figure out the orgin to include in the link
4952 $fromquery = array();

Follow-up revisions

RevisionCommit summaryAuthorDate
r94201Fix whitespace in r93757catrope21:19, 10 August 2011
r976401.18wmf1: MFT r93757catrope16:13, 20 September 2011
r97678REL1_18 MFT r93757, r97647reedy22:53, 20 September 2011

Status & tagging log