From c417448eeca584592a8be18ccf1ca9e78c103604 Mon Sep 17 00:00:00 2001 From: Aaron Schulz Date: Tue, 9 Dec 2008 22:12:29 +0000 Subject: [PATCH] Cleanup updateRestrictions() some --- includes/Article.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/Article.php b/includes/Article.php index bb1d7a0206..71939042cd 100644 --- a/includes/Article.php +++ b/includes/Article.php @@ -1837,7 +1837,7 @@ class Article { global $wgUser, $wgRestrictionTypes, $wgContLang; $id = $this->mTitle->getArticleID(); - if( array() != $this->mTitle->getUserPermissionsErrors( 'protect', $wgUser ) || wfReadOnly() || $id == 0 ) { + if( $id <= 0 || wfReadOnly() || !$this->mTitle->userCan('protect') ) { return false; } -- 2.20.1