Index: trunk/phase3/includes/api/ApiParse.php |
— | — | @@ -99,6 +99,7 @@ |
100 | 100 | if ( $titleObj->getLatestRevID() === intval( $oldid ) ) { |
101 | 101 | $articleObj = new Article( $titleObj, 0 ); |
102 | 102 | |
| 103 | + // May get from/save to parser cache |
103 | 104 | $p_result = $this->getParsedSectionOrText( $articleObj, $titleObj, $popts, $pageid, |
104 | 105 | isset( $prop['wikitext'] ) ) ; |
105 | 106 | } else { // This is an old revision, so get the text differently |
— | — | @@ -110,7 +111,7 @@ |
111 | 112 | $this->text = $this->getSectionText( $this->text, 'r' . $rev->getId() ); |
112 | 113 | } |
113 | 114 | |
114 | | - // Do we want to save old revision parses to the parser cache? |
| 115 | + // Should we save old revision parses to the parser cache? |
115 | 116 | $p_result = $wgParser->parse( $this->text, $titleObj, $popts ); |
116 | 117 | } |
117 | 118 | } else { // Not $oldid, but $pageid or $page |
— | — | @@ -182,6 +183,7 @@ |
183 | 184 | } |
184 | 185 | if ( $params['onlypst'] ) { |
185 | 186 | // Build a result and bail out |
| 187 | + $result_array = array(); |
186 | 188 | $result_array['text'] = array(); |
187 | 189 | $result->setContent( $result_array['text'], $this->pstText ); |
188 | 190 | if ( isset( $prop['wikitext'] ) ) { |
— | — | @@ -321,7 +323,7 @@ |
322 | 324 | if ( $this->section !== false ) { |
323 | 325 | global $wgParser; |
324 | 326 | |
325 | | - $this->text = $this->getSectionText( $articleObj->getRawText(), !is_null ( $pageId ) |
| 327 | + $this->text = $this->getSectionText( $articleObj->getRawText(), !is_null( $pageId ) |
326 | 328 | ? 'page id ' . $pageId : $titleObj->getText() ); |
327 | 329 | |
328 | 330 | // Not cached (save or load) |
Index: trunk/phase3/includes/Revision.php |
— | — | @@ -123,7 +123,7 @@ |
124 | 124 | |
125 | 125 | /** |
126 | 126 | * @since 1.19 |
127 | | - * |
| 127 | + * |
128 | 128 | * @param $row |
129 | 129 | * @return Revision |
130 | 130 | */ |
Index: trunk/tools/mwmultiversion/multiversion/MWMultiVersion.php |
— | — | @@ -4,10 +4,12 @@ |
5 | 5 | * version of MediaWiki is running on a wiki installation |
6 | 6 | */ |
7 | 7 | class MWMultiVersion { |
| 8 | + |
8 | 9 | /** |
9 | 10 | * @var MWMultiVersion |
10 | 11 | */ |
11 | 12 | private static $instance; |
| 13 | + |
12 | 14 | /** |
13 | 15 | * @var string |
14 | 16 | */ |
— | — | @@ -26,7 +28,7 @@ |
27 | 29 | private $versionLoaded = false; |
28 | 30 | |
29 | 31 | /** |
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. |
31 | 33 | * @see getInstanceForWiki |
32 | 34 | * @see getInstanceForUploadWiki |
33 | 35 | */ |
— | — | @@ -93,7 +95,6 @@ |
94 | 96 | * Derives site and lang from the parameters and sets $site and $lang on the instance |
95 | 97 | * @param $serverName the ServerName for this wiki -- $_SERVER['SERVER_NAME'] |
96 | 98 | * @param $docRoot the DocumentRoot for this wiki -- $_SERVER['DOCUMENT_ROOT'] |
97 | | - * @return void |
98 | 99 | */ |
99 | 100 | private function setSiteInfoForWiki( $serverName, $docRoot ) { |
100 | 101 | $secure = getenv( 'MW_SECURE_HOST' ); |
— | — | @@ -140,7 +141,6 @@ |
141 | 142 | /** |
142 | 143 | * Derives site and lang from the parameter and sets $site and $lang on the instance |
143 | 144 | * @param $pathInfo the PathInfo -- $_SERVER['PATH_INFO'] |
144 | | - * @return void |
145 | 145 | */ |
146 | 146 | private function setSiteInfoForUploadWiki( $pathInfo ) { |
147 | 147 | $pathBits = explode( '/', $pathInfo ); |
— | — | @@ -155,7 +155,6 @@ |
156 | 156 | /** |
157 | 157 | * Gets the site and lang from the --wiki argument. |
158 | 158 | * This code reflects how Maintenance.php reads arguments. |
159 | | - * @return void |
160 | 159 | */ |
161 | 160 | private function setSiteInfoForMaintenance() { |
162 | 161 | global $argv; |
— | — | @@ -183,7 +182,6 @@ |
184 | 183 | * Load the DB from the site and lang for this wiki |
185 | 184 | * @param $site string |
186 | 185 | * @param $lang string |
187 | | - * @return void |
188 | 186 | */ |
189 | 187 | private function loadDBFromSite( $site, $lang ) { |
190 | 188 | if ( $site === "wikipedia" ) { |
— | — | @@ -207,7 +205,6 @@ |
208 | 206 | * Get the space-seperated list of version params for this wiki. |
209 | 207 | * The first item is the MW version and the optional second item |
210 | 208 | * an extra version parameter to use for builds and caches. |
211 | | - * @return void |
212 | 209 | */ |
213 | 210 | private function loadVersionInfo() { |
214 | 211 | if ( $this->versionLoaded ) { |