From 91fc85a133cffd2afa402206db48ece5f0d69759 Mon Sep 17 00:00:00 2001 From: Aaron Schulz Date: Mon, 1 Jun 2009 16:16:46 +0000 Subject: [PATCH] Tweak r51279: re-added ability to hide comment/user of top revision --- includes/specials/SpecialRevisiondelete.php | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/includes/specials/SpecialRevisiondelete.php b/includes/specials/SpecialRevisiondelete.php index d40a031d60..5b9448db16 100644 --- a/includes/specials/SpecialRevisiondelete.php +++ b/includes/specials/SpecialRevisiondelete.php @@ -170,11 +170,13 @@ class SpecialRevisionDelete extends UnlistedSpecialPage { $qc = $this->getLogQueryCond(); # Show relevant lines from the deletion log $wgOut->addHTML( "

" . htmlspecialchars( LogPage::logName( 'delete' ) ) . "

\n" ); - LogEventsList::showLogExtract( $wgOut, 'delete', $this->targetObj->getPrefixedText(), '', 25, $qc ); + LogEventsList::showLogExtract( $wgOut, 'delete', + $this->targetObj->getPrefixedText(), '', 25, $qc ); # Show relevant lines from the suppression log if( $wgUser->isAllowed( 'suppressionlog' ) ) { $wgOut->addHTML( "

" . htmlspecialchars( LogPage::logName( 'suppress' ) ) . "

\n" ); - LogEventsList::showLogExtract( $wgOut, 'suppress', $this->targetObj->getPrefixedText(), '', 25, $qc ); + LogEventsList::showLogExtract( $wgOut, 'suppress', + $this->targetObj->getPrefixedText(), '', 25, $qc ); } } @@ -293,7 +295,8 @@ class SpecialRevisionDelete extends UnlistedSpecialPage { if ( $this->typeName == 'logging' ) { $wgOut->addWikiMsg( 'logdelete-selected', $wgLang->formatNum( count($this->ids) ) ); } else { - $wgOut->addWikiMsg( 'revdelete-selected', $this->targetObj->getPrefixedText(), count( $this->ids ) ); + $wgOut->addWikiMsg( 'revdelete-selected', + $this->targetObj->getPrefixedText(), count( $this->ids ) ); } $bitfields = 0; @@ -644,7 +647,8 @@ abstract class RevDel_List { $opType = 'modify'; } - if ( $item->isCurrent() && $opType == 'hide' ) { + // TODO: use FILE::DELETED_FILE, though value is the same + if ( $item->isCurrent() && ($newBits & Revision::DELETED_TEXT) ) { // Cannot hide current version text $status->error( 'revdelete-hide-current', $item->formatDate(), $item->formatTime() ); $status->failCount++; -- 2.20.1