From bc41ea3de8f17b296b883b56cf5e6d75c22594b1 Mon Sep 17 00:00:00 2001 From: Alexandre Emsenhuber Date: Wed, 26 Aug 2009 17:37:42 +0000 Subject: [PATCH] Follow-up r55584: seems that the "View logs for this page" link is useful even when doing log suppression :) --- RELEASE-NOTES | 4 +-- includes/specials/SpecialRevisiondelete.php | 30 +++++++++++---------- 2 files changed, 18 insertions(+), 16 deletions(-) diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 3e205e4e17..2a9249bd06 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -432,8 +432,8 @@ this. Was used when mwEmbed was going to be an extension. DatabaseBase::getFlag() now have documentation * (bug 19966) MediaWiki:License-header is now used for the licensing header in the file description page instead of MediaWiki:License -* (bug 20380) Link to history/log action at the top of Special:RevisionDelete - are new more displayed when when doing log suppression +* (bug 20380) Links to history/deleted edits at the top of + Special:RevisionDelete are no more displayed when when doing log suppression * (bug 8143) Localised parser function names are now correctly case insensitive if they contain non-ASCII characters diff --git a/includes/specials/SpecialRevisiondelete.php b/includes/specials/SpecialRevisiondelete.php index a23455d276..3445893153 100644 --- a/includes/specials/SpecialRevisiondelete.php +++ b/includes/specials/SpecialRevisiondelete.php @@ -183,7 +183,7 @@ class SpecialRevisionDelete extends UnlistedSpecialPage { protected function showConvenienceLinks() { global $wgOut, $wgUser, $wgLang; # Give a link to the logs/hist for this page - if( $this->targetObj && $this->targetObj->getNamespace() != NS_SPECIAL ) { + if( $this->targetObj ) { $links = array(); $logtitle = SpecialPage::getTitleFor( 'Log' ); $links[] = $this->skin->linkKnown( @@ -192,22 +192,24 @@ class SpecialRevisionDelete extends UnlistedSpecialPage { array(), array( 'page' => $this->targetObj->getPrefixedText() ) ); - # Give a link to the page history - $links[] = $this->skin->linkKnown( - $this->targetObj, - wfMsgHtml( 'pagehist' ), - array(), - array( 'action' => 'history' ) - ); - # Link to deleted edits - if( $wgUser->isAllowed('undelete') ) { - $undelete = SpecialPage::getTitleFor( 'Undelete' ); + if ( $this->targetObj->getNamespace() != NS_SPECIAL ) { + # Give a link to the page history $links[] = $this->skin->linkKnown( - $undelete, - wfMsgHtml( 'deletedhist' ), + $this->targetObj, + wfMsgHtml( 'pagehist' ), array(), - array( 'target' => $this->targetObj->getPrefixedDBkey() ) + array( 'action' => 'history' ) ); + # Link to deleted edits + if( $wgUser->isAllowed('undelete') ) { + $undelete = SpecialPage::getTitleFor( 'Undelete' ); + $links[] = $this->skin->linkKnown( + $undelete, + wfMsgHtml( 'deletedhist' ), + array(), + array( 'target' => $this->targetObj->getPrefixedDBkey() ) + ); + } } # Logs themselves don't have histories or archived revisions $wgOut->setSubtitle( '

' . $wgLang->pipeList( $links ) . '

' ); -- 2.20.1