From 67d91714f67d7ea52d9003d3a7b2ff3c77a98913 Mon Sep 17 00:00:00 2001 From: Alexandre Emsenhuber Date: Thu, 17 Feb 2011 17:06:06 +0000 Subject: [PATCH] * Don't use assignment in a condition check * Pass the Title object so that it doesn't rely on $wgTitle --- includes/Article.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/includes/Article.php b/includes/Article.php index 82bef47720..40a2c4f5c1 100644 --- a/includes/Article.php +++ b/includes/Article.php @@ -1033,10 +1033,11 @@ class Article { # tents of 'pagetitle-view-mainpage' instead of the default (if # that's not empty). # This message always exists because it is in the i18n files - if ( $this->mTitle->equals( Title::newMainPage() ) - && ( $m = wfMsgForContent( 'pagetitle-view-mainpage' ) ) !== '' ) - { - $wgOut->setHTMLTitle( $m ); + if ( $this->mTitle->equals( Title::newMainPage() ) ) { + $msg = wfMessage( 'pagetitle-view-mainpage' )->inContentLanguage(); + if ( !$msg->isDisabled() ) { + $wgOut->setHTMLTitle( $msg->title( $this->mTitle )->text() ); + } } # Now that we've filled $this->mParserOutput, we know whether -- 2.20.1