Follow-up r113223: set the "interface" flag in Message to true by default and set...
authorAlexandre Emsenhuber <ialex@users.mediawiki.org>
Tue, 13 Mar 2012 18:41:13 +0000 (18:41 +0000)
committerAlexandre Emsenhuber <ialex@users.mediawiki.org>
Tue, 13 Mar 2012 18:41:13 +0000 (18:41 +0000)
The point is to have the fix applied to all usages of IContextSource::msg() calls instead of only SpecialPage.

includes/Message.php
includes/SpecialPage.php

index 73914d7..7357ed7 100644 (file)
@@ -294,6 +294,7 @@ class Message {
        public function setContext( IContextSource $context ) {
                $this->inLanguage( $context->getLanguage() );
                $this->title( $context->getTitle() );
+               $this->interface = true;
 
                return $this;
        }
index 3f8b88e..411d5e4 100644 (file)
@@ -773,8 +773,8 @@ class SpecialPage {
                // the context, but setting the language for Message class removes the
                // interface message status, which breaks for example usernameless gender
                // invokations. Restore the flag when not including special page in content.
-               if ( !$this->including() ) {
-                       $message->setInterfaceMessageFlag( true );
+               if ( $this->including() ) {
+                       $message->setInterfaceMessageFlag( false );
                }
                return $message;
        }