- if( !$this->mRevision->userCan( Revision::DELETED_TEXT ) ) {
- $wgOut->addWikiMsg( 'rev-deleted-text-permission' );
+ // If the user is not allowed to see it...
+ if( !$this->mRevision->userCan(Revision::DELETED_TEXT) ) {
+ $wgOut->wrapWikiMsg( "<div class='mw-warning plainlinks'>\n$1</div>\n",
+ 'rev-deleted-text-permission' );
+ $wgOut->setPageTitle( $this->mTitle->getPrefixedText() );
+ wfProfileOut( __METHOD__ );
+ return;
+ // If the user needs to confirm that they want to see it...
+ } else if( !$unhide ) {
+ # Give explanation and add a link to view the revision...
+ $link = $this->mTitle->getFullUrl( "oldid={$oldid}".
+ '&unhide=1&token='.urlencode( $wgUser->editToken($oldid) ) );
+ $wgOut->wrapWikiMsg( "<div class='mw-warning plainlinks'>\n$1</div>\n",
+ array('rev-deleted-text-unhide',$link) );