Move <div>...</div> from message text to program code for consinstency with all other messages.

This commit is contained in:
Raimond Spekking 2009-02-22 11:32:33 +00:00
parent 147b86cc8b
commit aa0f3bbaeb
5 changed files with 18 additions and 19 deletions

View file

@ -923,12 +923,12 @@ class Article {
# Allow admins to see deleted content if explicitly requested
if( $this->mRevision->isDeleted( Revision::DELETED_TEXT ) ) {
if( !$unhide || !$this->mRevision->userCan(Revision::DELETED_TEXT) ) {
$wgOut->addWikiMsg( 'rev-deleted-text-permission' );
$wgOut->wrapWikiMsg( "<div class='mw-warning plainlinks'>\n$1</div>\n", 'rev-deleted-text-permission' );
$wgOut->setPageTitle( $this->mTitle->getPrefixedText() );
wfProfileOut( __METHOD__ );
return;
} else {
$wgOut->addWikiMsg( 'rev-deleted-text-view' );
$wgOut->wrapWikiMsg( "<div class='mw-warning plainlinks'>\n$1</div>\n", 'rev-deleted-text-view' );
// and we are allowed to see...
}
}

View file

@ -1183,9 +1183,9 @@ class EditPage {
// Let sysop know that this will make private content public if saved
if ( !$this->mArticle->mRevision->userCan( Revision::DELETED_TEXT ) ) {
$wgOut->addWikiMsg( 'rev-deleted-text-permission' );
$wgOut->wrapWikiMsg( "<div class='mw-warning plainlinks'>\n$1</div>\n", 'rev-deleted-text-permission' );
} else if ( $this->mArticle->mRevision->isDeleted( Revision::DELETED_TEXT ) ) {
$wgOut->addWikiMsg( 'rev-deleted-text-view' );
$wgOut->wrapWikiMsg( "<div class='mw-warning plainlinks'>\n$1</div>\n", 'rev-deleted-text-view' );
}
if ( !$this->mArticle->mRevision->isCurrent() ) {

View file

@ -271,7 +271,8 @@ CONTROL;
$this->showDiffStyle();
$multi = $this->getMultiNotice();
$wgOut->addHTML( $this->addHeader( '', $oldHeader, $newHeader, $multi ) );
$wgOut->addWikiMsg( 'rev-deleted-no-diff' );
$wgOut->wrapWikiMsg( "<div class='mw-warning plainlinks'>\n$1</div>\n",
array( 'rev-deleted-no-diff' ) );
} else if( $wgEnableHtmlDiff && $this->htmldiff ) {
$multi = $this->getMultiNotice();
$wgOut->addHTML('<div class="diff-switchtype">'.$sk->makeKnownLinkObj( $this->mTitle, wfMsgHtml( 'wikicodecomparison' ),
@ -301,9 +302,9 @@ CONTROL;
$wgOut->addHTML( "<hr /><h2>{$this->mPagetitle}</h2>\n" );
# Add deleted rev tag if needed
if( !$this->mNewRev->userCan(Revision::DELETED_TEXT) ) {
$wgOut->addWikiMsg( 'rev-deleted-text-permission' );
$wgOut->wrapWikiMsg( "<div class='mw-warning plainlinks'>\n$1</div>\n", 'rev-deleted-text-permission' );
} else if( $this->mNewRev->isDeleted(Revision::DELETED_TEXT) ) {
$wgOut->addWikiMsg( 'rev-deleted-text-view' );
$wgOut->wrapWikiMsg( "<div class='mw-warning plainlinks'>\n$1</div>\n", 'rev-deleted-text-view' );
}
if( !$this->mNewRev->isCurrent() ) {
@ -356,9 +357,9 @@ CONTROL;
$wgOut->addHTML( '<h2>'.wfMsgHtml( 'visual-comparison' )."</h2>\n" );
#add deleted rev tag if needed
if( !$this->mNewRev->userCan(Revision::DELETED_TEXT) ) {
$wgOut->addWikiMsg( 'rev-deleted-text-permission' );
$wgOut->wrapWikiMsg( "<div class='mw-warning plainlinks'>\n$1</div>\n", 'rev-deleted-text-permission' );
} else if( $this->mNewRev->isDeleted(Revision::DELETED_TEXT) ) {
$wgOut->addWikiMsg( 'rev-deleted-text-view' );
$wgOut->wrapWikiMsg( "<div class='mw-warning plainlinks'>\n$1</div>\n", 'rev-deleted-text-view' );
}
if( !$this->mNewRev->isCurrent() ) {

View file

@ -737,10 +737,10 @@ class UndeleteForm {
if( $rev->isDeleted(Revision::DELETED_TEXT) ) {
if( !$rev->userCan(Revision::DELETED_TEXT) ) {
$wgOut->addWikiText( wfMsg( 'rev-deleted-text-permission' ) );
$wgOut->wrapWikiMsg( "<div class='mw-warning plainlinks'>\n$1</div>\n", 'rev-deleted-text-permission' );
return;
} else {
$wgOut->addWikiText( wfMsg( 'rev-deleted-text-view' ) );
$wgOut->wrapWikiMsg( "<div class='mw-warning plainlinks'>\n$1</div>\n", 'rev-deleted-text-view' );
$wgOut->addHTML( '<br/>' );
// and we are allowed to see...
}

View file

@ -1291,15 +1291,13 @@ Try [[Special:Search|searching on the wiki]] for relevant new pages.',
'rev-deleted-comment' => '(comment removed)',
'rev-deleted-user' => '(username removed)',
'rev-deleted-event' => '(log action removed)',
'rev-deleted-text-permission' => '<div class="mw-warning plainlinks">
This page revision has been removed from the public archives.
There may be details in the [{{fullurl:Special:Log/delete|page={{FULLPAGENAMEE}}}} deletion log].</div>',
'rev-deleted-text-view' => '<div class="mw-warning plainlinks">
This page revision has been removed from the public archives.
'rev-deleted-text-permission' => 'This page revision has been removed from the public archives.
There may be details in the [{{fullurl:Special:Log/delete|page={{FULLPAGENAMEE}}}} deletion log].',
'rev-deleted-text-view' => 'This page revision has been removed from the public archives.
As an administrator on {{SITENAME}} you can view it;
there may be details in the [{{fullurl:Special:Log/delete|page={{FULLPAGENAMEE}}}} deletion log].</div>',
'rev-deleted-no-diff' => '<div class="mw-warning plainlinks">You cannot view this diff because one of the revisions has been removed from the public archives.
There may be details in the [{{fullurl:Special:Log/delete|page={{FULLPAGENAMEE}}}} deletion log].</div>',
there may be details in the [{{fullurl:Special:Log/delete|page={{FULLPAGENAMEE}}}} deletion log].',
'rev-deleted-no-diff' => 'You cannot view this diff because one of the revisions has been removed from the public archives.
There may be details in the [{{fullurl:Special:Log/delete|page={{FULLPAGENAMEE}}}} deletion log].',
'rev-delundel' => 'show/hide',
'revisiondelete' => 'Delete/undelete revisions',
'revdelete-nooldid-title' => 'Invalid target revision',