From ae29df49147dfc053d58b5ce26d6cfe4698454fb Mon Sep 17 00:00:00 2001 From: Sam Reed Date: Thu, 6 Jan 2011 16:24:49 +0000 Subject: [PATCH] Fix -rakkaus/#mediawiki-i18n- [06-Jan-2011 16:10:59] PHP Notice: Undefined variable: text in /www/w/includes/api/ApiParse.php on line 295 from r79455 --- includes/api/ApiParse.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/includes/api/ApiParse.php b/includes/api/ApiParse.php index 52c9749f46..2656638d86 100644 --- a/includes/api/ApiParse.php +++ b/includes/api/ApiParse.php @@ -97,7 +97,7 @@ class ApiParse extends ApiBase { if ( $titleObj->getLatestRevID() === intval( $oldid ) ) { $articleObj = new Article( $titleObj ); - $p_result = $this->getParsedSectionOrText( $articleObj, $titleObj, $popts, $pageid ) ; + $p_result = $this->getParsedSectionOrText( $articleObj, $titleObj, $text, $popts, $pageid ) ; } else { $text = $rev->getText( Revision::FOR_THIS_USER ); @@ -147,7 +147,7 @@ class ApiParse extends ApiBase { $oldid = $articleObj->getRevIdFetched(); } - $p_result = $this->getParsedSectionOrText( $articleObj, $titleObj, $popts, $pageid ) ; + $p_result = $this->getParsedSectionOrText( $articleObj, $titleObj, $text, $popts, $pageid ) ; } } else { $titleObj = Title::newFromText( $title ); @@ -285,10 +285,11 @@ class ApiParse extends ApiBase { * @param $articleObj Article * @param $titleObj Title * @param $pageId Int + * @param $text String * @param $popts ParserOptions * @return ParserOutput */ - private function getParsedSectionOrText( $articleObj, $titleObj, $popts, $pageId = null ) { + private function getParsedSectionOrText( $articleObj, $titleObj, $text, $popts, $pageId = null ) { global $wgParser; if ( $this->section !== false ) { -- 2.20.1