Revision: 50177 Author: aaron Date: 2009-05-04 13:32:50 +0000 (Mon, 04 May 2009)
Log Message: ----------- (bug 18666) Add show/hide to contribs Modified Paths: -------------- trunk/phase3/includes/specials/SpecialContributions.php Modified: trunk/phase3/includes/specials/SpecialContributions.php =================================================================== --- trunk/phase3/includes/specials/SpecialContributions.php 2009-05-04 13:30:57 UTC (rev 50176) +++ trunk/phase3/includes/specials/SpecialContributions.php 2009-05-04 13:32:50 UTC (rev 50177) @@ -473,7 +473,7 @@ * @todo This would probably look a lot nicer in a table. */ function formatRow( $row ) { - global $wgLang, $wgContLang; + global $wgUser, $wgLang, $wgContLang; wfProfileIn( __METHOD__ ); $sk = $this->getSkin(); @@ -532,8 +532,23 @@ } else { $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(), 'oldid' => $rev->getId() ); + $del = $this->mSkin->revDeleteLink( $query, + $rev->isDeleted( Revision::DELETED_RESTRICTED ) ) . ' '; + } + } else { + $del = ''; + } - $ret = "{$d} {$histlink} {$difftext} {$nflag}{$mflag} {$link}{$userlink} {$comment} {$topmarktext}"; + $ret = "{$del}{$d} {$histlink} {$difftext} {$nflag}{$mflag} {$link}{$userlink} {$comment} {$topmarktext}"; 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