From: Aaron Schulz Date: Sat, 12 Sep 2009 17:56:19 +0000 (+0000) Subject: * Removed duplicate revdelete links X-Git-Tag: 1.31.0-rc.0~39768 X-Git-Url: http://git.cyclocoop.org/url?a=commitdiff_plain;h=ae570099e76124c2739d08db481441c22bef6961;p=lhc%2Fweb%2Fwiklou.git * Removed duplicate revdelete links * Moved revdelete link up * Code style tweak --- 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 ) {