r50177 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r50176‎ | r50177 | r50178 >
Date:13:32, 4 May 2009
Author:aaron
Status:resolved
Tags:
Comment:
(bug 18666) Add show/hide to contribs
Modified paths:
  • /trunk/phase3/includes/specials/SpecialContributions.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/specials/SpecialContributions.php
@@ -473,7 +473,7 @@
474474 * @todo This would probably look a lot nicer in a table.
475475 */
476476 function formatRow( $row ) {
477 - global $wgLang, $wgContLang;
 477+ global $wgUser, $wgLang, $wgContLang;
478478 wfProfileIn( __METHOD__ );
479479
480480 $sk = $this->getSkin();
@@ -532,8 +532,23 @@
533533 } else {
534534 $mflag = '';
535535 }
 536+
 537+ if( $wgUser->isAllowed( 'deleterevision' ) ) {
 538+ // If revision was hidden from sysops
 539+ if( !$rev->userCan( Revision::DELETED_RESTRICTED ) ) {
 540+ $del = Xml::tags( 'span', array( 'class'=>'mw-revdelundel-link' ),
 541+ '(' . $this->message['rev-delundel'] . ')' ) . ' ';
 542+ // Otherwise, show the link...
 543+ } else {
 544+ $query = array( 'target' => $page->getPrefixedDbkey(), 'oldid' => $rev->getId() );
 545+ $del = $this->mSkin->revDeleteLink( $query,
 546+ $rev->isDeleted( Revision::DELETED_RESTRICTED ) ) . ' ';
 547+ }
 548+ } else {
 549+ $del = '';
 550+ }
536551
537 - $ret = "{$d} {$histlink} {$difftext} {$nflag}{$mflag} {$link}{$userlink} {$comment} {$topmarktext}";
 552+ $ret = "{$del}{$d} {$histlink} {$difftext} {$nflag}{$mflag} {$link}{$userlink} {$comment} {$topmarktext}";
538553 if( $rev->isDeleted( Revision::DELETED_TEXT ) ) {
539554 $ret .= ' ' . wfMsgHtml( 'deletedrev' );
540555 }

Follow-up revisions

RevisionCommit summaryAuthorDate
r50178(bug 18666) Add show/hide links to deletedcontribsaaron13:40, 4 May 2009
r50187(bug 18666) Add show/hide to deleted diffsaaron17:45, 4 May 2009
r55987Follow-up r50177: Fix a PHP notice due to typo in arrayname, message key miss...raymond18:53, 7 September 2009

Status & tagging log