r48220 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r48219‎ | r48220 | r48221 >
Date:12:44, 9 March 2009
Author:werdna
Status:ok
Tags:
Comment:
Don't add whitelisting cruft for wikis where local status is not settable.
Modified paths:
  • /trunk/extensions/GlobalBlocking/GlobalBlocking.i18n.php (modified) (history)
  • /trunk/extensions/GlobalBlocking/SpecialGlobalBlockList.php (modified) (history)
  • /trunk/extensions/GlobalBlocking/SpecialGlobalBlockStatus.php (modified) (history)

Diff [purge]

Index: trunk/extensions/GlobalBlocking/SpecialGlobalBlockStatus.php
@@ -23,6 +23,12 @@
2424 $this->displayRestrictionError();
2525 return;
2626 }
 27+
 28+ global $wgApplyGlobalBlocks;
 29+ if (!$wgApplyGlobalBlocks) {
 30+ $this->addWikiMsg( 'globalblocking-whitelist-notapplied' );
 31+ return;
 32+ }
2733
2834 $errors = '';
2935
Index: trunk/extensions/GlobalBlocking/GlobalBlocking.i18n.php
@@ -75,6 +75,8 @@
7676 [[Special:GlobalBlockList|Click here]] to return to the global block list.',
7777
7878 'globalblocking-whitelist' => 'Local status of global blocks',
 79+ 'globalblocking-whitelist-notapplied' => 'Global blocks are not applied at this wiki,
 80+so the local status of global blocks is not changeable',
7981 'globalblocking-whitelist-legend' => 'Change local status',
8082 'globalblocking-whitelist-reason' => 'Reason for change:',
8183 'globalblocking-whitelist-status' => 'Local status:',
Index: trunk/extensions/GlobalBlocking/SpecialGlobalBlockList.php
@@ -170,7 +170,8 @@
171171 ')';
172172 }
173173
174 - if( $wgUser->isAllowed( 'globalblock-whitelist' ) ) {
 174+ global $wgApplyGlobalBlocks;
 175+ if( $wgUser->isAllowed( 'globalblock-whitelist' ) && $wgApplyGlobalBlocks ) {
175176 $whitelistTitle = SpecialPage::getTitleFor( "GlobalBlockStatus" );
176177 $info[] = '(' . $sk->link($whitelistTitle,
177178 wfMsgExt( 'globalblocking-list-whitelist', 'parseinline' ),

Status & tagging log