From ae570099e76124c2739d08db481441c22bef6961 Mon Sep 17 00:00:00 2001 From: Aaron Schulz Date: Sat, 12 Sep 2009 17:56:19 +0000 Subject: [PATCH] * Removed duplicate revdelete links * Moved revdelete link up * Code style tweak --- includes/specials/SpecialUndelete.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/includes/specials/SpecialUndelete.php b/includes/specials/SpecialUndelete.php index d1c37b39c4..c0ff3b871a 100644 --- a/includes/specials/SpecialUndelete.php +++ b/includes/specials/SpecialUndelete.php @@ -773,7 +773,8 @@ class UndeleteForm { } $revdlink = ''; - if( $wgUser->isAllowed( 'deleterevision' ) ) { + // Diffs already have revision delete links + if( !$this->mDiff && $wgUser->isAllowed( 'deleterevision' ) ) { if( !$rev->userCan(Revision::DELETED_RESTRICTED ) ) { // If revision was hidden from sysops $revdlink = Xml::tags( 'span', array( 'class'=>'mw-revdelundel-link' ), @@ -788,8 +789,7 @@ class UndeleteForm { } } - $wgOut->addHTML( $openDiv . wfMsgWikiHtml( 'undelete-revision', $link, $time, $user, $d, $t ) . - $revdlink . '' ); + $wgOut->addHTML( $openDiv . $revdlink . wfMsgWikiHtml( 'undelete-revision', $link, $time, $user, $d, $t ) . '' ); wfRunHooks( 'UndeleteShowRevision', array( $this->mTargetObj, $rev ) ); if( $this->mPreview ) { @@ -864,8 +864,8 @@ class UndeleteForm { $diffEngine->generateDiffBody( $previousRev->getText(), $currentRev->getText() ) . "" . - "\n" ); - + "\n" + ); } private function diffHeader( $rev, $prefix ) { -- 2.20.1