http://www.mediawiki.org/wiki/Special:Code/MediaWiki/76411
Revision: 76411 Author: tparscal Date: 2010-11-09 21:01:56 +0000 (Tue, 09 Nov 2010) Log Message: ----------- Added $wgPrefSwitchShowLinks configuration to allow disabling the links in the personal tools. Modified Paths: -------------- branches/usability-initiative-1_16/PrefSwitch/PrefSwitch.hooks.php branches/usability-initiative-1_16/PrefSwitch/PrefSwitch.php Modified: branches/usability-initiative-1_16/PrefSwitch/PrefSwitch.hooks.php =================================================================== --- branches/usability-initiative-1_16/PrefSwitch/PrefSwitch.hooks.php 2010-11-09 19:54:07 UTC (rev 76410) +++ branches/usability-initiative-1_16/PrefSwitch/PrefSwitch.hooks.php 2010-11-09 21:01:56 UTC (rev 76411) @@ -21,7 +21,11 @@ } public static function personalUrls( &$personal_urls, &$title ) { - global $wgUser, $wgRequest; + global $wgUser, $wgRequest, $wgPrefSwitchShowLinks; + + if ( !$wgPrefSwitchShowLinks ) { + return true; + } // Loads opt-in messages wfLoadExtensionMessages( 'PrefSwitchLink' ); // Figure out the orgin to include in the link Modified: branches/usability-initiative-1_16/PrefSwitch/PrefSwitch.php =================================================================== --- branches/usability-initiative-1_16/PrefSwitch/PrefSwitch.php 2010-11-09 19:54:07 UTC (rev 76410) +++ branches/usability-initiative-1_16/PrefSwitch/PrefSwitch.php 2010-11-09 21:01:56 UTC (rev 76411) @@ -19,6 +19,7 @@ /* Configuration */ $wgPrefSwitchStyleVersion = 1; +$wgPrefSwitchShowLinks = true; // Preferences to set when users switch prefs // array( _______________________________________________ MediaWiki-CVS mailing list MediaWiki-CVS@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs