From: Alexandre Emsenhuber Date: Thu, 17 Feb 2011 17:06:06 +0000 (+0000) Subject: * Don't use assignment in a condition check X-Git-Tag: 1.31.0-rc.0~31950 X-Git-Url: https://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/banques/?a=commitdiff_plain;h=67d91714f67d7ea52d9003d3a7b2ff3c77a98913;p=lhc%2Fweb%2Fwiklou.git * Don't use assignment in a condition check * Pass the Title object so that it doesn't rely on $wgTitle --- 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