From 4b46b8022ec8f4dcf04ac78bfec302d29d00830b Mon Sep 17 00:00:00 2001 From: Andrew Garrett Date: Thu, 11 Jan 2007 00:44:55 +0000 Subject: [PATCH] More bugfixes. Fantastic. (and I tested, too! brion will be proud of me.) --- includes/Article.php | 7 ++++--- maintenance/updaters.inc | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/includes/Article.php b/includes/Article.php index 2aa733d360..bfec500d9b 100644 --- a/includes/Article.php +++ b/includes/Article.php @@ -2801,7 +2801,6 @@ class Article { * Updates templatelinks if it is out of date. * * @param string $text - * @param Article $article * @param bool $cache */ public function outputWikiText( $text, $cache = true ) { @@ -2812,9 +2811,9 @@ class Article { $parserOutput = $wgParser->parse( $text, $this->mTitle, $popts, true, true, $this->getRevIdFetched() ); $popts->setTidy(false); - if ( $cache && $article && $parserOutput->getCacheTime() != -1 ) { + if ( $cache && $this && $parserOutput->getCacheTime() != -1 ) { $parserCache =& ParserCache::singleton(); - $parserCache->save( $parserOutput, $article, $wgUser ); + $parserCache->save( $parserOutput, $this, $wgUser ); } if ( !wfReadOnly() ) { @@ -2833,6 +2832,8 @@ class Article { array( 'tl_from' => $id ), 'Article:getUsedTemplates' ); + global $wgContLang; + if ( false !== $res ) { if ( $dbr->numRows( $res ) ) { while ( $row = $dbr->fetchObject( $res ) ) { diff --git a/maintenance/updaters.inc b/maintenance/updaters.inc index 1570a65500..2f9ed54cbc 100644 --- a/maintenance/updaters.inc +++ b/maintenance/updaters.inc @@ -982,7 +982,7 @@ function do_restrictions_update() { $wgDatabase->insert( 'page_restrictions', array ( 'pr_page' => $id, 'pr_type' => $restriction_type, 'pr_level' => $restriction_level, - 'pr_cascade' => 0 ), __METHOD ); + 'pr_cascade' => 0 ), __METHOD__ ); } } } -- 2.20.1