From c63d52d96744b6af6f4012fe7584d653ec8ec3da Mon Sep 17 00:00:00 2001 From: Alexandre Emsenhuber Date: Sat, 2 Jul 2011 14:53:01 +0000 Subject: [PATCH] Removed one hidden usage of $wgUser --- includes/WikiPage.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; } -- 2.20.1