r93981 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r93980‎ | r93981 | r93982 >
Date:16:05, 5 August 2011
Author:reedy
Status:ok
Tags:
Comment:
Whitespace and comment updates
Modified paths:
  • /trunk/phase3/includes/Revision.php (modified) (history)
  • /trunk/phase3/includes/api/ApiParse.php (modified) (history)
  • /trunk/tools/mwmultiversion/multiversion/MWMultiVersion.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/api/ApiParse.php
@@ -99,6 +99,7 @@
100100 if ( $titleObj->getLatestRevID() === intval( $oldid ) ) {
101101 $articleObj = new Article( $titleObj, 0 );
102102
 103+ // May get from/save to parser cache
103104 $p_result = $this->getParsedSectionOrText( $articleObj, $titleObj, $popts, $pageid,
104105 isset( $prop['wikitext'] ) ) ;
105106 } else { // This is an old revision, so get the text differently
@@ -110,7 +111,7 @@
111112 $this->text = $this->getSectionText( $this->text, 'r' . $rev->getId() );
112113 }
113114
114 - // Do we want to save old revision parses to the parser cache?
 115+ // Should we save old revision parses to the parser cache?
115116 $p_result = $wgParser->parse( $this->text, $titleObj, $popts );
116117 }
117118 } else { // Not $oldid, but $pageid or $page
@@ -182,6 +183,7 @@
183184 }
184185 if ( $params['onlypst'] ) {
185186 // Build a result and bail out
 187+ $result_array = array();
186188 $result_array['text'] = array();
187189 $result->setContent( $result_array['text'], $this->pstText );
188190 if ( isset( $prop['wikitext'] ) ) {
@@ -321,7 +323,7 @@
322324 if ( $this->section !== false ) {
323325 global $wgParser;
324326
325 - $this->text = $this->getSectionText( $articleObj->getRawText(), !is_null ( $pageId )
 327+ $this->text = $this->getSectionText( $articleObj->getRawText(), !is_null( $pageId )
326328 ? 'page id ' . $pageId : $titleObj->getText() );
327329
328330 // Not cached (save or load)
Index: trunk/phase3/includes/Revision.php
@@ -123,7 +123,7 @@
124124
125125 /**
126126 * @since 1.19
127 - *
 127+ *
128128 * @param $row
129129 * @return Revision
130130 */
Index: trunk/tools/mwmultiversion/multiversion/MWMultiVersion.php
@@ -4,10 +4,12 @@
55 * version of MediaWiki is running on a wiki installation
66 */
77 class MWMultiVersion {
 8+
89 /**
910 * @var MWMultiVersion
1011 */
1112 private static $instance;
 13+
1214 /**
1315 * @var string
1416 */
@@ -26,7 +28,7 @@
2729 private $versionLoaded = false;
2830
2931 /**
30 - * To get an inststance of this class, use the statuc helper methods.
 32+ * To get an inststance of this class, use the static helper methods.
3133 * @see getInstanceForWiki
3234 * @see getInstanceForUploadWiki
3335 */
@@ -93,7 +95,6 @@
9496 * Derives site and lang from the parameters and sets $site and $lang on the instance
9597 * @param $serverName the ServerName for this wiki -- $_SERVER['SERVER_NAME']
9698 * @param $docRoot the DocumentRoot for this wiki -- $_SERVER['DOCUMENT_ROOT']
97 - * @return void
9899 */
99100 private function setSiteInfoForWiki( $serverName, $docRoot ) {
100101 $secure = getenv( 'MW_SECURE_HOST' );
@@ -140,7 +141,6 @@
141142 /**
142143 * Derives site and lang from the parameter and sets $site and $lang on the instance
143144 * @param $pathInfo the PathInfo -- $_SERVER['PATH_INFO']
144 - * @return void
145145 */
146146 private function setSiteInfoForUploadWiki( $pathInfo ) {
147147 $pathBits = explode( '/', $pathInfo );
@@ -155,7 +155,6 @@
156156 /**
157157 * Gets the site and lang from the --wiki argument.
158158 * This code reflects how Maintenance.php reads arguments.
159 - * @return void
160159 */
161160 private function setSiteInfoForMaintenance() {
162161 global $argv;
@@ -183,7 +182,6 @@
184183 * Load the DB from the site and lang for this wiki
185184 * @param $site string
186185 * @param $lang string
187 - * @return void
188186 */
189187 private function loadDBFromSite( $site, $lang ) {
190188 if ( $site === "wikipedia" ) {
@@ -207,7 +205,6 @@
208206 * Get the space-seperated list of version params for this wiki.
209207 * The first item is the MW version and the optional second item
210208 * an extra version parameter to use for builds and caches.
211 - * @return void
212209 */
213210 private function loadVersionInfo() {
214211 if ( $this->versionLoaded ) {

Status & tagging log