r52689 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r52688‎ | r52689 | r52690 >
Date:12:32, 2 July 2009
Author:nikerabbit
Status:ok
Tags:
Comment:
Check for wfEmptyMsg too, since message cache checks messages set to - in files, trying to get from namespace, and returns non-existing message instead
Modified paths:
  • /trunk/phase3/includes/EditPage.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/EditPage.php
@@ -657,6 +657,7 @@
658658 }
659659 }
660660
 661+ // FIXME: unused variable?
661662 $this->oldid = $request->getInt( 'oldid' );
662663
663664 $this->live = $request->getCheck( 'live' );
@@ -1708,7 +1709,7 @@
17091710 // so should remain short!
17101711 wfRunHooks( 'EditPageTosSummary', array( $this->mTitle, &$msg ) );
17111712 $text = wfMsg( $msg );
1712 - if( $text != '-' ) {
 1713+ if( !wfEmptyMsg( $msg, $text ) && $text !== '-' ) {
17131714 global $wgOut;
17141715 $wgOut->addHTML( '<div class="mw-tos-summary">' );
17151716 $wgOut->addWikiMsgArray( $msg, array() );

Status & tagging log