r76411 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r76410‎ | r76411 | r76412 >
Date:21:01, 9 November 2010
Author:tparscal
Status:ok
Tags:
Comment:
Added $wgPrefSwitchShowLinks configuration to allow disabling the links in the personal tools.
Modified paths:
  • /branches/usability-initiative-1_16/PrefSwitch/PrefSwitch.hooks.php (modified) (history)
  • /branches/usability-initiative-1_16/PrefSwitch/PrefSwitch.php (modified) (history)

Diff [purge]

Index: branches/usability-initiative-1_16/PrefSwitch/PrefSwitch.php
@@ -19,6 +19,7 @@
2020 /* Configuration */
2121
2222 $wgPrefSwitchStyleVersion = 1;
 23+$wgPrefSwitchShowLinks = true;
2324
2425 // Preferences to set when users switch prefs
2526 // array(
Index: branches/usability-initiative-1_16/PrefSwitch/PrefSwitch.hooks.php
@@ -21,7 +21,11 @@
2222 }
2323
2424 public static function personalUrls( &$personal_urls, &$title ) {
25 - global $wgUser, $wgRequest;
 25+ global $wgUser, $wgRequest, $wgPrefSwitchShowLinks;
 26+
 27+ if ( !$wgPrefSwitchShowLinks ) {
 28+ return true;
 29+ }
2630 // Loads opt-in messages
2731 wfLoadExtensionMessages( 'PrefSwitchLink' );
2832 // Figure out the orgin to include in the link

Follow-up revisions

RevisionCommit summaryAuthorDate
r764121.16wmf4: Merge r76411catrope21:06, 9 November 2010

Status & tagging log