From 345a593955081228456b9791e1c985cf4bc0535b Mon Sep 17 00:00:00 2001 From: Alexandre Emsenhuber Date: Tue, 13 Mar 2012 18:41:13 +0000 Subject: [PATCH] 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. --- includes/Message.php | 1 + includes/SpecialPage.php | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) 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; } -- 2.20.1