From b85469eceb4c5a803952d2f74c0aa5a6ac8b7d37 Mon Sep 17 00:00:00 2001 From: Sam Reed Date: Fri, 5 Aug 2011 16:05:41 +0000 Subject: [PATCH] Whitespace and comment updates --- includes/Revision.php | 2 +- includes/api/ApiParse.php | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/includes/Revision.php b/includes/Revision.php index 3465ca92ec..f93108017b 100644 --- a/includes/Revision.php +++ b/includes/Revision.php @@ -123,7 +123,7 @@ class Revision { /** * @since 1.19 - * + * * @param $row * @return Revision */ diff --git a/includes/api/ApiParse.php b/includes/api/ApiParse.php index 40b90cff90..6b9f65bdfe 100644 --- a/includes/api/ApiParse.php +++ b/includes/api/ApiParse.php @@ -99,6 +99,7 @@ class ApiParse extends ApiBase { if ( $titleObj->getLatestRevID() === intval( $oldid ) ) { $articleObj = new Article( $titleObj, 0 ); + // May get from/save to parser cache $p_result = $this->getParsedSectionOrText( $articleObj, $titleObj, $popts, $pageid, isset( $prop['wikitext'] ) ) ; } else { // This is an old revision, so get the text differently @@ -110,7 +111,7 @@ class ApiParse extends ApiBase { $this->text = $this->getSectionText( $this->text, 'r' . $rev->getId() ); } - // Do we want to save old revision parses to the parser cache? + // Should we save old revision parses to the parser cache? $p_result = $wgParser->parse( $this->text, $titleObj, $popts ); } } else { // Not $oldid, but $pageid or $page @@ -182,6 +183,7 @@ class ApiParse extends ApiBase { } if ( $params['onlypst'] ) { // Build a result and bail out + $result_array = array(); $result_array['text'] = array(); $result->setContent( $result_array['text'], $this->pstText ); if ( isset( $prop['wikitext'] ) ) { @@ -321,7 +323,7 @@ class ApiParse extends ApiBase { if ( $this->section !== false ) { global $wgParser; - $this->text = $this->getSectionText( $articleObj->getRawText(), !is_null ( $pageId ) + $this->text = $this->getSectionText( $articleObj->getRawText(), !is_null( $pageId ) ? 'page id ' . $pageId : $titleObj->getText() ); // Not cached (save or load) -- 2.20.1