r88289 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r88288‎ | r88289 | r88290 >
Date:08:32, 17 May 2011
Author:siebrand
Status:ok
Tags:
Comment:
Suprtfluous whitespace removed.
Modified paths:
  • /trunk/phase3/includes/api/ApiParse.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/api/ApiParse.php
@@ -1,7 +1,5 @@
22 <?php
33 /**
4 - *
5 - *
64 * Created on Dec 01, 2007
75 *
86 * Copyright © 2007 Yuri Astrakhan <Firstname><Lastname>@gmail.com
@@ -33,7 +31,6 @@
3432 * @ingroup API
3533 */
3634 class ApiParse extends ApiBase {
37 -
3835 private $section, $text, $pstText = null;
3936
4037 public function __construct( $main, $action ) {
@@ -81,7 +78,6 @@
8279 $redirValues = null;
8380
8481 if ( !is_null( $oldid ) || !is_null( $pageid ) || !is_null( $page ) ) {
85 -
8682 if ( !is_null( $oldid ) ) {
8783 // Don't use the parser cache
8884 $rev = Revision::newFromID( $oldid );
@@ -102,7 +98,6 @@
10399
104100 $p_result = $this->getParsedSectionOrText( $articleObj, $titleObj, $popts, $pageid,
105101 isset( $prop['wikitext'] ) ) ;
106 -
107102 } else { // This is an old revision, so get the text differently
108103 $this->text = $rev->getText( Revision::FOR_THIS_USER );
109104
@@ -114,9 +109,7 @@
115110
116111 $p_result = $wgParser->parse( $this->text, $titleObj, $popts );
117112 }
118 -
119113 } else { // Not $oldid
120 -
121114 if ( !is_null ( $pageid ) ) {
122115 $titleObj = Title::newFromID( $pageid );
123116
@@ -124,7 +117,6 @@
125118 $this->dieUsageMsg( array( 'nosuchpageid', $pageid ) );
126119 }
127120 } else { // $page
128 -
129121 if ( $params['redirects'] ) {
130122 $req = new FauxRequest( array(
131123 'action' => 'query',
@@ -158,7 +150,6 @@
159151 $p_result = $this->getParsedSectionOrText( $articleObj, $titleObj, $popts, $pageid,
160152 isset( $prop['wikitext'] ) ) ;
161153 }
162 -
163154 } else { // Not $oldid, $pageid, $page. Hence based on $text
164155
165156 $this->text = $text;
@@ -275,7 +266,7 @@
276267 if ( isset( $prop['iwlinks'] ) ) {
277268 $result_array['iwlinks'] = $this->formatIWLinks( $p_result->getInterwikiLinks() );
278269 }
279 -
 270+
280271 if ( isset( $prop['wikitext'] ) ) {
281272 $result_array['wikitext'] = array();
282273 $result->setContent( $result_array['wikitext'], $this->text );
@@ -349,7 +340,7 @@
350341 $entry = array();
351342 $bits = explode( ':', $link, 2 );
352343 $title = Title::newFromText( $link );
353 -
 344+
354345 $entry['lang'] = $bits[0];
355346 if ( $title ) {
356347 $entry['url'] = $title->getFullURL();

Status & tagging log