From: Aaron Schulz Date: Sun, 19 Jul 2009 00:33:30 +0000 (+0000) Subject: bug 18725 add revision suppression UI on deleted revision page X-Git-Tag: 1.31.0-rc.0~40844 X-Git-Url: http://git.cyclocoop.org/%24action?a=commitdiff_plain;h=c437ea2cd4ac7bf4397765c3812536fd7151d8ee;p=lhc%2Fweb%2Fwiklou.git bug 18725 add revision suppression UI on deleted revision page --- diff --git a/includes/specials/SpecialUndelete.php b/includes/specials/SpecialUndelete.php index f713fe437d..f7b62cda26 100644 --- a/includes/specials/SpecialUndelete.php +++ b/includes/specials/SpecialUndelete.php @@ -753,8 +753,25 @@ class UndeleteForm { } else { $openDiv = '
'; } + + $revdlink = ''; + if( $wgUser->isAllowed( 'deleterevision' ) ) { + if( !$rev->userCan(Revision::DELETED_RESTRICTED ) ) { + // If revision was hidden from sysops + $revdlink = Xml::tags( 'span', array( 'class'=>'mw-revdelundel-link' ), + '('.wfMsgHtml('rev-delundel').')' ); + } else { + $query = array( + 'type' => 'archive', + 'target' => $this->mTargetObj->getPrefixedDBkey(), + 'ids' => $rev->getTimestamp() + ); + $revdlink = $skin->revDeleteLink( $query, $rev->isDeleted( File::DELETED_RESTRICTED ) ); + } + } - $wgOut->addHTML( $openDiv . wfMsgWikiHtml( 'undelete-revision', $link, $time, $user, $d, $t ) . '
' ); + $wgOut->addHTML( $openDiv . wfMsgWikiHtml( 'undelete-revision', $link, $time, $user, $d, $t ) . + $revdlink . '' ); wfRunHooks( 'UndeleteShowRevision', array( $this->mTargetObj, $rev ) ); if( $this->mPreview ) {