* (bug 12446) Permissions check fix for undelete link
authorBrion Vibber <brion@users.mediawiki.org>
Mon, 31 Dec 2007 21:09:43 +0000 (21:09 +0000)
committerBrion Vibber <brion@users.mediawiki.org>
Mon, 31 Dec 2007 21:09:43 +0000 (21:09 +0000)
Patch by  Alexandre Emsenhuber  - http://bugzilla.wikimedia.org/attachment.cgi?id=4483

RELEASE-NOTES
includes/Skin.php
includes/SkinTemplate.php

index 5e80096..7d565c7 100644 (file)
@@ -272,6 +272,7 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN
 * (bug 12416) Fix password setting for createAndPromote.php
 * (bug 3097) Inconsistently usable titles containing HTML character entities
   are now forbidden. A run of cleanupTitles.php will fix up existing pages.
+* (bug 12446) Permissions check fix for undelete link
 
 
 == Parser changes in 1.12 ==
index 8ce2613..9d00e1d 100644 (file)
@@ -784,7 +784,7 @@ END;
                        (($wgTitle->getArticleId() == 0) || ($action == "history")) &&
                        ($n = $wgTitle->isDeleted() ) )
                {
-                       if ( $wgUser->isAllowed( 'delete' ) ) {
+                       if ( $wgUser->isAllowed( 'undelete' ) ) {
                                $msg = 'thisisdeleted';
                        } else {
                                $msg = 'viewdeleted';
index c0e2007..09457ff 100644 (file)
@@ -752,7 +752,7 @@ class SkinTemplate extends Skin {
                                }
                        } else {
                                //article doesn't exist or is deleted
-                               if( $wgUser->isAllowed( 'delete' ) ) {
+                               if( $wgUser->isAllowed( 'deletedhistory' ) && $wgUser->isAllowed( 'undelete' ) ) {
                                        if( $n = $this->mTitle->isDeleted() ) {
                                                $undelTitle = SpecialPage::getTitleFor( 'Undelete' );
                                                $content_actions['undelete'] = array(