r47656 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r47655‎ | r47656 | r47657 >
Date:11:32, 22 February 2009
Author:raymond
Status:ok
Tags:
Comment:
Move <div>...</div> from message text to program code for consinstency with all other messages.
Modified paths:
  • /trunk/extensions/MetavidWiki/includes/MV_MetavidInterface/MV_EditPageAjax.php (modified) (history)
  • /trunk/phase3/includes/Article.php (modified) (history)
  • /trunk/phase3/includes/EditPage.php (modified) (history)
  • /trunk/phase3/includes/diff/DifferenceEngine.php (modified) (history)
  • /trunk/phase3/includes/specials/SpecialUndelete.php (modified) (history)
  • /trunk/phase3/languages/messages/MessagesEn.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/diff/DifferenceEngine.php
@@ -271,7 +271,8 @@
272272 $this->showDiffStyle();
273273 $multi = $this->getMultiNotice();
274274 $wgOut->addHTML( $this->addHeader( '', $oldHeader, $newHeader, $multi ) );
275 - $wgOut->addWikiMsg( 'rev-deleted-no-diff' );
 275+ $wgOut->wrapWikiMsg( "<div class='mw-warning plainlinks'>\n$1</div>\n",
 276+ array( 'rev-deleted-no-diff' ) );
276277 } else if( $wgEnableHtmlDiff && $this->htmldiff ) {
277278 $multi = $this->getMultiNotice();
278279 $wgOut->addHTML('<div class="diff-switchtype">'.$sk->makeKnownLinkObj( $this->mTitle, wfMsgHtml( 'wikicodecomparison' ),
@@ -301,9 +302,9 @@
302303 $wgOut->addHTML( "<hr /><h2>{$this->mPagetitle}</h2>\n" );
303304 # Add deleted rev tag if needed
304305 if( !$this->mNewRev->userCan(Revision::DELETED_TEXT) ) {
305 - $wgOut->addWikiMsg( 'rev-deleted-text-permission' );
 306+ $wgOut->wrapWikiMsg( "<div class='mw-warning plainlinks'>\n$1</div>\n", 'rev-deleted-text-permission' );
306307 } else if( $this->mNewRev->isDeleted(Revision::DELETED_TEXT) ) {
307 - $wgOut->addWikiMsg( 'rev-deleted-text-view' );
 308+ $wgOut->wrapWikiMsg( "<div class='mw-warning plainlinks'>\n$1</div>\n", 'rev-deleted-text-view' );
308309 }
309310
310311 if( !$this->mNewRev->isCurrent() ) {
@@ -356,9 +357,9 @@
357358 $wgOut->addHTML( '<h2>'.wfMsgHtml( 'visual-comparison' )."</h2>\n" );
358359 #add deleted rev tag if needed
359360 if( !$this->mNewRev->userCan(Revision::DELETED_TEXT) ) {
360 - $wgOut->addWikiMsg( 'rev-deleted-text-permission' );
 361+ $wgOut->wrapWikiMsg( "<div class='mw-warning plainlinks'>\n$1</div>\n", 'rev-deleted-text-permission' );
361362 } else if( $this->mNewRev->isDeleted(Revision::DELETED_TEXT) ) {
362 - $wgOut->addWikiMsg( 'rev-deleted-text-view' );
 363+ $wgOut->wrapWikiMsg( "<div class='mw-warning plainlinks'>\n$1</div>\n", 'rev-deleted-text-view' );
363364 }
364365
365366 if( !$this->mNewRev->isCurrent() ) {
Index: trunk/phase3/includes/Article.php
@@ -923,12 +923,12 @@
924924 # Allow admins to see deleted content if explicitly requested
925925 if( $this->mRevision->isDeleted( Revision::DELETED_TEXT ) ) {
926926 if( !$unhide || !$this->mRevision->userCan(Revision::DELETED_TEXT) ) {
927 - $wgOut->addWikiMsg( 'rev-deleted-text-permission' );
 927+ $wgOut->wrapWikiMsg( "<div class='mw-warning plainlinks'>\n$1</div>\n", 'rev-deleted-text-permission' );
928928 $wgOut->setPageTitle( $this->mTitle->getPrefixedText() );
929929 wfProfileOut( __METHOD__ );
930930 return;
931931 } else {
932 - $wgOut->addWikiMsg( 'rev-deleted-text-view' );
 932+ $wgOut->wrapWikiMsg( "<div class='mw-warning plainlinks'>\n$1</div>\n", 'rev-deleted-text-view' );
933933 // and we are allowed to see...
934934 }
935935 }
Index: trunk/phase3/includes/EditPage.php
@@ -1183,9 +1183,9 @@
11841184 // Let sysop know that this will make private content public if saved
11851185
11861186 if ( !$this->mArticle->mRevision->userCan( Revision::DELETED_TEXT ) ) {
1187 - $wgOut->addWikiMsg( 'rev-deleted-text-permission' );
 1187+ $wgOut->wrapWikiMsg( "<div class='mw-warning plainlinks'>\n$1</div>\n", 'rev-deleted-text-permission' );
11881188 } else if ( $this->mArticle->mRevision->isDeleted( Revision::DELETED_TEXT ) ) {
1189 - $wgOut->addWikiMsg( 'rev-deleted-text-view' );
 1189+ $wgOut->wrapWikiMsg( "<div class='mw-warning plainlinks'>\n$1</div>\n", 'rev-deleted-text-view' );
11901190 }
11911191
11921192 if ( !$this->mArticle->mRevision->isCurrent() ) {
Index: trunk/phase3/includes/specials/SpecialUndelete.php
@@ -737,10 +737,10 @@
738738
739739 if( $rev->isDeleted(Revision::DELETED_TEXT) ) {
740740 if( !$rev->userCan(Revision::DELETED_TEXT) ) {
741 - $wgOut->addWikiText( wfMsg( 'rev-deleted-text-permission' ) );
 741+ $wgOut->wrapWikiMsg( "<div class='mw-warning plainlinks'>\n$1</div>\n", 'rev-deleted-text-permission' );
742742 return;
743743 } else {
744 - $wgOut->addWikiText( wfMsg( 'rev-deleted-text-view' ) );
 744+ $wgOut->wrapWikiMsg( "<div class='mw-warning plainlinks'>\n$1</div>\n", 'rev-deleted-text-view' );
745745 $wgOut->addHTML( '<br/>' );
746746 // and we are allowed to see...
747747 }
Index: trunk/phase3/languages/messages/MessagesEn.php
@@ -1291,15 +1291,13 @@
12921292 'rev-deleted-comment' => '(comment removed)',
12931293 'rev-deleted-user' => '(username removed)',
12941294 'rev-deleted-event' => '(log action removed)',
1295 -'rev-deleted-text-permission' => '<div class="mw-warning plainlinks">
1296 -This page revision has been removed from the public archives.
1297 -There may be details in the [{{fullurl:Special:Log/delete|page={{FULLPAGENAMEE}}}} deletion log].</div>',
1298 -'rev-deleted-text-view' => '<div class="mw-warning plainlinks">
1299 -This page revision has been removed from the public archives.
 1295+'rev-deleted-text-permission' => 'This page revision has been removed from the public archives.
 1296+There may be details in the [{{fullurl:Special:Log/delete|page={{FULLPAGENAMEE}}}} deletion log].',
 1297+'rev-deleted-text-view' => 'This page revision has been removed from the public archives.
13001298 As an administrator on {{SITENAME}} you can view it;
1301 -there may be details in the [{{fullurl:Special:Log/delete|page={{FULLPAGENAMEE}}}} deletion log].</div>',
1302 -'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.
1303 -There may be details in the [{{fullurl:Special:Log/delete|page={{FULLPAGENAMEE}}}} deletion log].</div>',
 1299+there may be details in the [{{fullurl:Special:Log/delete|page={{FULLPAGENAMEE}}}} deletion log].',
 1300+'rev-deleted-no-diff' => 'You cannot view this diff because one of the revisions has been removed from the public archives.
 1301+There may be details in the [{{fullurl:Special:Log/delete|page={{FULLPAGENAMEE}}}} deletion log].',
13041302 'rev-delundel' => 'show/hide',
13051303 'revisiondelete' => 'Delete/undelete revisions',
13061304 'revdelete-nooldid-title' => 'Invalid target revision',
Index: trunk/extensions/MetavidWiki/includes/MV_MetavidInterface/MV_EditPageAjax.php
@@ -469,7 +469,7 @@
470470 if ( isset( $this->mArticle ) && isset( $this->mArticle->mRevision ) ) {
471471 // Let sysop know that this will make private content public if saved
472472 if ( $this->mArticle->mRevision->isDeleted( Revision::DELETED_TEXT ) ) {
473 - $wgOut->addWikiText( wfMsg( 'rev-deleted-text-view' ) );
 473+ $wgOut->wrapWikiMsg( "<div class='mw-warning plainlinks'>\n$1</div>\n", 'rev-deleted-text-view' );
474474 }
475475 if ( !$this->mArticle->mRevision->isCurrent() ) {
476476 $this->mArticle->setOldSubtitle( $this->mArticle->mRevision->getId() );

Status & tagging log