From: Aaron Schulz Date: Tue, 9 Dec 2008 22:12:29 +0000 (+0000) Subject: Cleanup updateRestrictions() some X-Git-Tag: 1.31.0-rc.0~44082 X-Git-Url: https://git.cyclocoop.org/%7B%24admin_url%7Dmembres/modifier.php?a=commitdiff_plain;h=c417448eeca584592a8be18ccf1ca9e78c103604;p=lhc%2Fweb%2Fwiklou.git Cleanup updateRestrictions() some --- 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; }