r91354 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r91353‎ | r91354 | r91355 >
Date:14:53, 2 July 2011
Author:ialex
Status:ok
Tags:
Comment:
Removed one hidden usage of $wgUser
Modified paths:
  • /trunk/phase3/includes/WikiPage.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/WikiPage.php
@@ -1250,7 +1250,7 @@
12511251 return false;
12521252 }
12531253
1254 - if ( !$this->mTitle->userCan( 'protect' ) ) {
 1254+ if ( count( $this->mTitle->getUserPermissionsErrors( 'protect', $user ) ) ) {
12551255 wfDebug( "updateRestrictions failed: insufficient permissions\n" );
12561256 return false;
12571257 }

Status & tagging log