Check for wfEmptyMsg too, since message cache checks messages set to - in files,...
authorNiklas Laxström <nikerabbit@users.mediawiki.org>
Thu, 2 Jul 2009 12:32:28 +0000 (12:32 +0000)
committerNiklas Laxström <nikerabbit@users.mediawiki.org>
Thu, 2 Jul 2009 12:32:28 +0000 (12:32 +0000)
includes/EditPage.php

index dd934d8..8fbbdb1 100644 (file)
@@ -657,6 +657,7 @@ class EditPage {
                        }
                }
 
+               // FIXME: unused variable?
                $this->oldid = $request->getInt( 'oldid' );
 
                $this->live = $request->getCheck( 'live' );
@@ -1708,7 +1709,7 @@ END
                // so should remain short!
                wfRunHooks( 'EditPageTosSummary', array( $this->mTitle, &$msg ) );
                $text = wfMsg( $msg );
-               if( $text != '-' ) {
+               if( !wfEmptyMsg( $msg, $text ) && $text !== '-' ) {
                        global $wgOut;
                        $wgOut->addHTML( '<div class="mw-tos-summary">' );
                        $wgOut->addWikiMsgArray( $msg, array() );