r50187 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r50186‎ | r50187 | r50188 >
Date:17:45, 4 May 2009
Author:aaron
Status:ok (Comments)
Tags:
Comment:
(bug 18666) Add show/hide to deleted diffs
Modified paths:
  • /trunk/phase3/includes/specials/SpecialUndelete.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/specials/SpecialUndelete.php
@@ -875,6 +875,22 @@
876876 $targetPage = $rev->getTitle();
877877 $targetQuery = 'oldid=' . $rev->getId();
878878 }
 879+ // Add show/hide link if available
 880+ if( $wgUser->isAllowed( 'deleterevision' ) ) {
 881+ // If revision was hidden from sysops
 882+ if( !$rev->userCan( Revision::DELETED_RESTRICTED ) ) {
 883+ $del = ' ' . Xml::tags( 'span', array( 'class'=>'mw-revdelundel-link' ),
 884+ '(' . wfMsgHtml('rev-delundel') . ')' );
 885+ // Otherwise, show the link...
 886+ } else {
 887+ $query = array( 'target' => $this->mTargetObj->getPrefixedDbkey(),
 888+ 'artimestamp' => $rev->getTimestamp() );
 889+ $del = ' ' . $sk->revDeleteLink( $query,
 890+ $rev->isDeleted( Revision::DELETED_RESTRICTED ) );
 891+ }
 892+ } else {
 893+ $del = '';
 894+ }
879895 return
880896 '<div id="mw-diff-'.$prefix.'title1"><strong>' .
881897 $sk->makeLinkObj( $targetPage,
@@ -887,7 +903,7 @@
888904 $sk->revUserTools( $rev ) . '<br/>' .
889905 '</div>' .
890906 '<div id="mw-diff-'.$prefix.'title3">' .
891 - $sk->revComment( $rev ) . '<br/>' .
 907+ $sk->revComment( $rev ) . $del . '<br/>' .
892908 '</div>';
893909 }
894910

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r50177(bug 18666) Add show/hide to contribsaaron13:32, 4 May 2009
r50178(bug 18666) Add show/hide links to deletedcontribsaaron13:40, 4 May 2009

Comments

#Comment by Brion VIBBER (talk | contribs)   22:13, 5 May 2009

Hit fixme by mistake, looks fine. :)

Status & tagging log