r79727 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r79726‎ | r79727 | r79728 >
Date:16:24, 6 January 2011
Author:reedy
Status:ok
Tags:
Comment:
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
Modified paths:
  • /trunk/phase3/includes/api/ApiParse.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/api/ApiParse.php
@@ -97,7 +97,7 @@
9898 if ( $titleObj->getLatestRevID() === intval( $oldid ) ) {
9999 $articleObj = new Article( $titleObj );
100100
101 - $p_result = $this->getParsedSectionOrText( $articleObj, $titleObj, $popts, $pageid ) ;
 101+ $p_result = $this->getParsedSectionOrText( $articleObj, $titleObj, $text, $popts, $pageid ) ;
102102
103103 } else {
104104 $text = $rev->getText( Revision::FOR_THIS_USER );
@@ -147,7 +147,7 @@
148148 $oldid = $articleObj->getRevIdFetched();
149149 }
150150
151 - $p_result = $this->getParsedSectionOrText( $articleObj, $titleObj, $popts, $pageid ) ;
 151+ $p_result = $this->getParsedSectionOrText( $articleObj, $titleObj, $text, $popts, $pageid ) ;
152152 }
153153 } else {
154154 $titleObj = Title::newFromText( $title );
@@ -285,10 +285,11 @@
286286 * @param $articleObj Article
287287 * @param $titleObj Title
288288 * @param $pageId Int
 289+ * @param $text String
289290 * @param $popts ParserOptions
290291 * @return ParserOutput
291292 */
292 - private function getParsedSectionOrText( $articleObj, $titleObj, $popts, $pageId = null ) {
 293+ private function getParsedSectionOrText( $articleObj, $titleObj, $text, $popts, $pageId = null ) {
293294 global $wgParser;
294295
295296 if ( $this->section !== false ) {

Follow-up revisions

RevisionCommit summaryAuthorDate
r814071.17: MFT r79454, r79455, r79456, r79536, r79727, r79733, r79773, r79774, r80...catrope19:18, 2 February 2011

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r79455Allow section to work with oldid when oldid == currentrevid (worked with olde...reedy23:01, 1 January 2011

Status & tagging log