Index: trunk/phase3/includes/specials/SpecialContributions.php |
— | — | @@ -473,7 +473,7 @@ |
474 | 474 | * @todo This would probably look a lot nicer in a table. |
475 | 475 | */ |
476 | 476 | function formatRow( $row ) { |
477 | | - global $wgLang, $wgContLang; |
| 477 | + global $wgUser, $wgLang, $wgContLang; |
478 | 478 | wfProfileIn( __METHOD__ ); |
479 | 479 | |
480 | 480 | $sk = $this->getSkin(); |
— | — | @@ -532,8 +532,23 @@ |
533 | 533 | } else { |
534 | 534 | $mflag = ''; |
535 | 535 | } |
| 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 | + } |
536 | 551 | |
537 | | - $ret = "{$d} {$histlink} {$difftext} {$nflag}{$mflag} {$link}{$userlink} {$comment} {$topmarktext}"; |
| 552 | + $ret = "{$del}{$d} {$histlink} {$difftext} {$nflag}{$mflag} {$link}{$userlink} {$comment} {$topmarktext}"; |
538 | 553 | if( $rev->isDeleted( Revision::DELETED_TEXT ) ) { |
539 | 554 | $ret .= ' ' . wfMsgHtml( 'deletedrev' ); |
540 | 555 | } |