Index: trunk/phase3/includes/specials/SpecialUndelete.php |
— | — | @@ -875,6 +875,22 @@ |
876 | 876 | $targetPage = $rev->getTitle(); |
877 | 877 | $targetQuery = 'oldid=' . $rev->getId(); |
878 | 878 | } |
| 879 | + // Add show/hide link if available |
| 880 | + if( $wgUser->isAllowed( 'deleterevision' ) ) { |
| 881 | + // If revision was hidden from sysops |
| 882 | + if( !$rev->userCan( Revision::DELETED_RESTRICTED ) ) { |
| 883 | + $del = ' ' . Xml::tags( 'span', array( 'class'=>'mw-revdelundel-link' ), |
| 884 | + '(' . wfMsgHtml('rev-delundel') . ')' ); |
| 885 | + // Otherwise, show the link... |
| 886 | + } else { |
| 887 | + $query = array( 'target' => $this->mTargetObj->getPrefixedDbkey(), |
| 888 | + 'artimestamp' => $rev->getTimestamp() ); |
| 889 | + $del = ' ' . $sk->revDeleteLink( $query, |
| 890 | + $rev->isDeleted( Revision::DELETED_RESTRICTED ) ); |
| 891 | + } |
| 892 | + } else { |
| 893 | + $del = ''; |
| 894 | + } |
879 | 895 | return |
880 | 896 | '<div id="mw-diff-'.$prefix.'title1"><strong>' . |
881 | 897 | $sk->makeLinkObj( $targetPage, |
— | — | @@ -887,7 +903,7 @@ |
888 | 904 | $sk->revUserTools( $rev ) . '<br/>' . |
889 | 905 | '</div>' . |
890 | 906 | '<div id="mw-diff-'.$prefix.'title3">' . |
891 | | - $sk->revComment( $rev ) . '<br/>' . |
| 907 | + $sk->revComment( $rev ) . $del . '<br/>' . |
892 | 908 | '</div>'; |
893 | 909 | } |
894 | 910 | |