Index: trunk/phase3/includes/specials/SpecialDeletedContributions.php |
— | — | @@ -106,10 +106,9 @@ |
107 | 107 | * @todo This would probably look a lot nicer in a table. |
108 | 108 | */ |
109 | 109 | function formatRow( $row ) { |
| 110 | + global $wgUser, $wgLang; |
110 | 111 | wfProfileIn( __METHOD__ ); |
111 | 112 | |
112 | | - global $wgLang; |
113 | | - |
114 | 113 | $sk = $this->getSkin(); |
115 | 114 | |
116 | 115 | $rev = new Revision( array( |
— | — | @@ -164,8 +163,23 @@ |
165 | 164 | $mflag = ''; |
166 | 165 | } |
167 | 166 | |
| 167 | + if( $wgUser->isAllowed( 'deleterevision' ) ) { |
| 168 | + // If revision was hidden from sysops |
| 169 | + if( !$rev->userCan( Revision::DELETED_RESTRICTED ) ) { |
| 170 | + $del = Xml::tags( 'span', array( 'class'=>'mw-revdelundel-link' ), |
| 171 | + '(' . $this->message['rev-delundel'] . ')' ) . ' '; |
| 172 | + // Otherwise, show the link... |
| 173 | + } else { |
| 174 | + $query = array( 'target' => $page->getPrefixedDbkey(), |
| 175 | + 'artimestamp' => $rev->getTimestamp() ); |
| 176 | + $del = $this->mSkin->revDeleteLink( $query, |
| 177 | + $rev->isDeleted( Revision::DELETED_RESTRICTED ) ) . ' '; |
| 178 | + } |
| 179 | + } else { |
| 180 | + $del = ''; |
| 181 | + } |
168 | 182 | |
169 | | - $ret = "{$link} ($last) ({$dellog}) ({$reviewlink}) . . {$mflag} {$pagelink} {$comment}"; |
| 183 | + $ret = "{$del}{$link} ({$last}) ({$dellog}) ({$reviewlink}) . . {$mflag} {$pagelink} {$comment}"; |
170 | 184 | if( $rev->isDeleted( Revision::DELETED_TEXT ) ) { |
171 | 185 | $ret .= ' ' . wfMsgHtml( 'deletedrev' ); |
172 | 186 | } |