From: Aaron Schulz Date: Fri, 28 Sep 2007 23:56:40 +0000 (+0000) Subject: *Don't add redundant perm errors, as the text can get doubled up on edit X-Git-Tag: 1.31.0-rc.0~51249 X-Git-Url: https://git.cyclocoop.org/%242?a=commitdiff_plain;h=0ca99a2e9b2835803798d49dbf7e8a0d5bf028a1;p=lhc%2Fweb%2Fwiklou.git *Don't add redundant perm errors, as the text can get doubled up on edit --- diff --git a/includes/EditPage.php b/includes/EditPage.php index 5a0c20d933..3a19c45304 100644 --- a/includes/EditPage.php +++ b/includes/EditPage.php @@ -318,9 +318,9 @@ class EditPage { return; } - $permErrors = $this->mTitle->getUserPermissionsErrors( 'edit', $wgUser); + $permErrors = $this->mTitle->getUserPermissionsErrors('edit', $wgUser); if( !$this->mTitle->exists() ) - $permErrors += $this->mTitle->getUserPermissionsErrors( 'create', $wgUser); + $permErrors += array_diff( $this->mTitle->getUserPermissionsErrors('create', $wgUser), $permErrors ); # Ignore some permissions errors. $remove = array();