Revision: 50178 Author: aaron Date: 2009-05-04 13:40:09 +0000 (Mon, 04 May 2009)
Log Message: ----------- (bug 18666) Add show/hide links to deletedcontribs Modified Paths: -------------- trunk/phase3/includes/specials/SpecialDeletedContributions.php Modified: trunk/phase3/includes/specials/SpecialDeletedContributions.php =================================================================== --- trunk/phase3/includes/specials/SpecialDeletedContributions.php 2009-05-04 13:32:50 UTC (rev 50177) +++ trunk/phase3/includes/specials/SpecialDeletedContributions.php 2009-05-04 13:40:09 UTC (rev 50178) @@ -106,10 +106,9 @@ * @todo This would probably look a lot nicer in a table. */ function formatRow( $row ) { + global $wgUser, $wgLang; wfProfileIn( __METHOD__ ); - global $wgLang; - $sk = $this->getSkin(); $rev = new Revision( array( @@ -164,8 +163,23 @@ $mflag = ''; } + if( $wgUser->isAllowed( 'deleterevision' ) ) { + // If revision was hidden from sysops + if( !$rev->userCan( Revision::DELETED_RESTRICTED ) ) { + $del = Xml::tags( 'span', array( 'class'=>'mw-revdelundel-link' ), + '(' . $this->message['rev-delundel'] . ')' ) . ' '; + // Otherwise, show the link... + } else { + $query = array( 'target' => $page->getPrefixedDbkey(), + 'artimestamp' => $rev->getTimestamp() ); + $del = $this->mSkin->revDeleteLink( $query, + $rev->isDeleted( Revision::DELETED_RESTRICTED ) ) . ' '; + } + } else { + $del = ''; + } - $ret = "{$link} ($last) ({$dellog}) ({$reviewlink}) . . {$mflag} {$pagelink} {$comment}"; + $ret = "{$del}{$link} ({$last}) ({$dellog}) ({$reviewlink}) . . {$mflag} {$pagelink} {$comment}"; if( $rev->isDeleted( Revision::DELETED_TEXT ) ) { $ret .= ' ' . wfMsgHtml( 'deletedrev' ); } _______________________________________________ MediaWiki-CVS mailing list MediaWiki-CVS@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs