From: Alexandre Emsenhuber Date: Sat, 2 Jul 2011 14:53:01 +0000 (+0000) Subject: Removed one hidden usage of $wgUser X-Git-Tag: 1.31.0-rc.0~29104 X-Git-Url: http://git.cyclocoop.org/%22%20.%20%20%20%24self2%20.%20%20%20%22&var_mode_affiche=boucle?a=commitdiff_plain;h=c63d52d96744b6af6f4012fe7584d653ec8ec3da;p=lhc%2Fweb%2Fwiklou.git Removed one hidden usage of $wgUser --- diff --git a/includes/WikiPage.php b/includes/WikiPage.php index cf2c58ae59..db6c1ece80 100644 --- a/includes/WikiPage.php +++ b/includes/WikiPage.php @@ -1250,7 +1250,7 @@ class WikiPage extends Page { return false; } - if ( !$this->mTitle->userCan( 'protect' ) ) { + if ( count( $this->mTitle->getUserPermissionsErrors( 'protect', $user ) ) ) { wfDebug( "updateRestrictions failed: insufficient permissions\n" ); return false; }