From: Alexandre Emsenhuber Date: Tue, 13 Mar 2012 18:41:13 +0000 (+0000) Subject: Follow-up r113223: set the "interface" flag in Message to true by default and set... X-Git-Tag: 1.31.0-rc.0~24273 X-Git-Url: http://git.cyclocoop.org/ecrire?a=commitdiff_plain;h=345a593955081228456b9791e1c985cf4bc0535b;p=lhc%2Fweb%2Fwiklou.git Follow-up r113223: set the "interface" flag in Message to true by default and set it to false when the page is included. The point is to have the fix applied to all usages of IContextSource::msg() calls instead of only SpecialPage. --- diff --git a/includes/Message.php b/includes/Message.php index 73914d7b92..7357ed73a9 100644 --- a/includes/Message.php +++ b/includes/Message.php @@ -294,6 +294,7 @@ class Message { public function setContext( IContextSource $context ) { $this->inLanguage( $context->getLanguage() ); $this->title( $context->getTitle() ); + $this->interface = true; return $this; } diff --git a/includes/SpecialPage.php b/includes/SpecialPage.php index 3f8b88e1d3..411d5e4ba2 100644 --- a/includes/SpecialPage.php +++ b/includes/SpecialPage.php @@ -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; }