From: Sam Reed Date: Thu, 6 Jan 2011 16:24:49 +0000 (+0000) Subject: Fix -rakkaus/#mediawiki-i18n- [06-Jan-2011 16:10:59] PHP Notice: Undefined variable... X-Git-Tag: 1.31.0-rc.0~32762 X-Git-Url: https://git.cyclocoop.org/%7B%24admin_url%7Dmembres/modifier.php?a=commitdiff_plain;h=ae29df49147dfc053d58b5ce26d6cfe4698454fb;p=lhc%2Fweb%2Fwiklou.git 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 --- 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 ) {