Removed one hidden usage of $wgUser
authorAlexandre Emsenhuber <ialex@users.mediawiki.org>
Sat, 2 Jul 2011 14:53:01 +0000 (14:53 +0000)
committerAlexandre Emsenhuber <ialex@users.mediawiki.org>
Sat, 2 Jul 2011 14:53:01 +0000 (14:53 +0000)
includes/WikiPage.php

index cf2c58a..db6c1ec 100644 (file)
@@ -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;
                }