r29129 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r29128‎ | r29129 | r29130 >
Date:21:09, 31 December 2007
Author:brion
Status:old
Tags:
Comment:
* (bug 12446) Permissions check fix for undelete link
Patch by Alexandre Emsenhuber - http://bugzilla.wikimedia.org/attachment.cgi?id=4483
Modified paths:
  • /trunk/phase3/RELEASE-NOTES (modified) (history)
  • /trunk/phase3/includes/Skin.php (modified) (history)
  • /trunk/phase3/includes/SkinTemplate.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/SkinTemplate.php
@@ -752,7 +752,7 @@
753753 }
754754 } else {
755755 //article doesn't exist or is deleted
756 - if( $wgUser->isAllowed( 'delete' ) ) {
 756+ if( $wgUser->isAllowed( 'deletedhistory' ) && $wgUser->isAllowed( 'undelete' ) ) {
757757 if( $n = $this->mTitle->isDeleted() ) {
758758 $undelTitle = SpecialPage::getTitleFor( 'Undelete' );
759759 $content_actions['undelete'] = array(
Index: trunk/phase3/includes/Skin.php
@@ -784,7 +784,7 @@
785785 (($wgTitle->getArticleId() == 0) || ($action == "history")) &&
786786 ($n = $wgTitle->isDeleted() ) )
787787 {
788 - if ( $wgUser->isAllowed( 'delete' ) ) {
 788+ if ( $wgUser->isAllowed( 'undelete' ) ) {
789789 $msg = 'thisisdeleted';
790790 } else {
791791 $msg = 'viewdeleted';
Index: trunk/phase3/RELEASE-NOTES
@@ -272,6 +272,7 @@
273273 * (bug 12416) Fix password setting for createAndPromote.php
274274 * (bug 3097) Inconsistently usable titles containing HTML character entities
275275 are now forbidden. A run of cleanupTitles.php will fix up existing pages.
 276+* (bug 12446) Permissions check fix for undelete link
276277
277278
278279 == Parser changes in 1.12 ==

Status & tagging log