From b50935d3bf48e4fffdf22011a888e5e345b2c4b8 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Niklas=20Laxstr=C3=B6m?= Date: Mon, 12 Jan 2009 08:11:22 +0000 Subject: [PATCH] brr, Article::getContent still has "side effects" --- includes/Article.php | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/includes/Article.php b/includes/Article.php index 5d91a432e5..c4135c37b4 100644 --- a/includes/Article.php +++ b/includes/Article.php @@ -218,7 +218,7 @@ class Article { if( wfEmptyMsg( $message, $text ) ) $text = ''; } else { - $text = wfMsg( $wgUser->isLoggedIn() ? 'noarticletext' : 'noarticletextanon' ); + $text = wfMsgExt( $wgUser->isLoggedIn() ? 'noarticletext' : 'noarticletextanon', 'parsemag' ); } wfProfileOut( __METHOD__ ); return $text; @@ -831,14 +831,16 @@ class Article { $this->showDeletionLog(); } $text = $this->getContent(); - if( $text === false ) { + // For now, check also for ID until getContent actually returns + // false for pages that do not exists + if( $text === false || $this->getID() === 0 ) { # Failed to load, replace text with error message $t = $this->mTitle->getPrefixedText(); if( $oldid ) { - $d = wfMsgExt( 'missingarticle-rev', array( 'escape' ), $oldid ); - $text = wfMsg( 'missing-article', $t, $d ); + $d = wfMsgExt( 'missingarticle-rev', 'escape', $oldid ); + $text = wfMsgExt( 'missing-article', 'parsemag', $t, $d ); } else { - $text = wfMsg( 'noarticletext' ); + $text = wfMsgExt( 'noarticletext', 'parsemag' ); } } -- 2.20.1