http://www.mediawiki.org/wiki/Special:Code/MediaWiki/56235
Revision: 56235
Author: aaron
Date: 2009-09-12 17:56:19 +0000 (Sat, 12 Sep 2009)
Log Message:
-----------
* Removed duplicate revdelete links
* Moved revdelete link up
* Code style tweak
Modified Paths:
--------------
trunk/phase3/includes/specials/SpecialUndelete.php
Modified: trunk/phase3/includes/specials/SpecialUndelete.php
===================================================================
--- trunk/phase3/includes/specials/SpecialUndelete.php 2009-09-12 17:46:51 UTC
(rev 56234)
+++ trunk/phase3/includes/specials/SpecialUndelete.php 2009-09-12 17:56:19 UTC
(rev 56235)
@@ -773,7 +773,8 @@
}
$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 @@
}
}
- $wgOut->addHTML( $openDiv . wfMsgWikiHtml( 'undelete-revision',
$link, $time, $user, $d, $t ) .
- $revdlink . '</div>' );
+ $wgOut->addHTML( $openDiv . $revdlink . wfMsgWikiHtml(
'undelete-revision', $link, $time, $user, $d, $t ) . '</div>' );
wfRunHooks( 'UndeleteShowRevision', array( $this->mTargetObj,
$rev ) );
if( $this->mPreview ) {
@@ -864,8 +864,8 @@
$diffEngine->generateDiffBody(
$previousRev->getText(), $currentRev->getText()
) .
"</table>" .
- "</div>\n" );
-
+ "</div>\n"
+ );
}
private function diffHeader( $rev, $prefix ) {
_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs