Index: trunk/phase3/includes/api/ApiQuerySiteinfo.php |
— | — | @@ -262,7 +262,7 @@ |
263 | 263 | if ( $row->iw_local == '1' ) { |
264 | 264 | $val['local'] = ''; |
265 | 265 | } |
266 | | - //$val['trans'] = intval( $row->iw_trans ); // should this be exposed? |
| 266 | + // $val['trans'] = intval( $row->iw_trans ); // should this be exposed? |
267 | 267 | if ( isset( $langNames[$row->iw_prefix] ) ) { |
268 | 268 | $val['language'] = $langNames[$row->iw_prefix]; |
269 | 269 | } |
Index: trunk/phase3/includes/api/ApiResult.php |
— | — | @@ -285,12 +285,12 @@ |
286 | 286 | } |
287 | 287 | return true; |
288 | 288 | } |
289 | | - |
| 289 | + |
290 | 290 | /** |
291 | 291 | * Add a parsed limit=max to the result. |
292 | | - * |
| 292 | + * |
293 | 293 | * @param $moduleName string |
294 | | - * @param $limit int |
| 294 | + * @param $limit int |
295 | 295 | */ |
296 | 296 | public function setParsedLimit( $moduleName, $limit ) { |
297 | 297 | // Add value, allowing overwriting |
Index: trunk/phase3/includes/api/ApiBase.php |
— | — | @@ -307,7 +307,7 @@ |
308 | 308 | if ( $deprecated ) { |
309 | 309 | $desc = "DEPRECATED! $desc"; |
310 | 310 | } |
311 | | - |
| 311 | + |
312 | 312 | $required = isset( $paramSettings[self::PARAM_REQUIRED] ) ? |
313 | 313 | $paramSettings[self::PARAM_REQUIRED] : false; |
314 | 314 | if ( $required ) { |
— | — | @@ -494,7 +494,7 @@ |
495 | 495 | |
496 | 496 | if ( $params ) { // getFinalParams() can return false |
497 | 497 | foreach ( $params as $paramName => $paramSettings ) { |
498 | | - $results[$paramName] = $this->getParameterFromSettings( |
| 498 | + $results[$paramName] = $this->getParameterFromSettings( |
499 | 499 | $paramName, $paramSettings, $parseLimit ); |
500 | 500 | } |
501 | 501 | } |
— | — | @@ -666,7 +666,7 @@ |
667 | 667 | if ( $value === '' ) { |
668 | 668 | $this->dieUsageMsg( array( 'missingparam', $paramName ) ); |
669 | 669 | } |
670 | | - |
| 670 | + |
671 | 671 | break; |
672 | 672 | case 'integer': // Force everything using intval() and optionally validate limits |
673 | 673 | |
— | — | @@ -1129,7 +1129,7 @@ |
1130 | 1130 | $params = $this->getFinalParams(); |
1131 | 1131 | if ( $params ) { |
1132 | 1132 | foreach ( $params as $paramName => $paramSettings ) { |
1133 | | - if( isset( $paramSettings[ApiBase::PARAM_REQUIRED] ) ) { |
| 1133 | + if ( isset( $paramSettings[ApiBase::PARAM_REQUIRED] ) ) { |
1134 | 1134 | $ret[] = array( 'missingparam', $paramName ); |
1135 | 1135 | } |
1136 | 1136 | } |
Index: trunk/phase3/includes/api/ApiUpload.php |
— | — | @@ -56,10 +56,10 @@ |
57 | 57 | if ( !isset( $this->mUpload ) ) { |
58 | 58 | $this->dieUsage( 'No upload module set', 'nomodule' ); |
59 | 59 | } |
60 | | - |
| 60 | + |
61 | 61 | // First check permission to upload |
62 | 62 | $this->checkPermissions( $wgUser ); |
63 | | - |
| 63 | + |
64 | 64 | // Fetch the file |
65 | 65 | $status = $this->mUpload->fetchFile(); |
66 | 66 | if ( !$status->isGood() ) { |
— | — | @@ -70,7 +70,7 @@ |
71 | 71 | |
72 | 72 | // Check if the uploaded file is sane |
73 | 73 | $this->verifyUpload(); |
74 | | - |
| 74 | + |
75 | 75 | // Check permission to upload this file |
76 | 76 | $permErrors = $this->mUpload->verifyPermissions( $wgUser ); |
77 | 77 | if ( $permErrors !== true ) { |
— | — | @@ -91,13 +91,13 @@ |
92 | 92 | // Cleanup any temporary mess |
93 | 93 | $this->mUpload->cleanupTempFile(); |
94 | 94 | } |
95 | | - |
| 95 | + |
96 | 96 | /** |
97 | 97 | * Select an upload module and set it to mUpload. Dies on failure. |
98 | 98 | */ |
99 | 99 | protected function selectUploadModule() { |
100 | 100 | $request = $this->getMain()->getRequest(); |
101 | | - |
| 101 | + |
102 | 102 | // One and only one of the following parameters is needed |
103 | 103 | $this->requireOnlyOneParameter( $this->mParams, |
104 | 104 | 'sessionkey', 'file', 'url' ); |
— | — | @@ -113,20 +113,20 @@ |
114 | 114 | $this->mUpload->initialize( $this->mParams['filename'], |
115 | 115 | $this->mParams['sessionkey'], |
116 | 116 | $sessionData[$this->mParams['sessionkey']] ); |
117 | | - |
118 | | - |
| 117 | + |
| 118 | + |
119 | 119 | } elseif ( isset( $this->mParams['file'] ) ) { |
120 | 120 | $this->mUpload = new UploadFromFile(); |
121 | 121 | $this->mUpload->initialize( |
122 | 122 | $this->mParams['filename'], |
123 | 123 | $request->getUpload( 'file' ) |
124 | | - ); |
| 124 | + ); |
125 | 125 | } elseif ( isset( $this->mParams['url'] ) ) { |
126 | 126 | // Make sure upload by URL is enabled: |
127 | 127 | if ( !UploadFromUrl::isEnabled() ) { |
128 | 128 | $this->dieUsageMsg( array( 'copyuploaddisabled' ) ); |
129 | 129 | } |
130 | | - |
| 130 | + |
131 | 131 | $async = false; |
132 | 132 | if ( $this->mParams['asyncdownload'] ) { |
133 | 133 | if ( $this->mParams['leavemessage'] ) { |
— | — | @@ -166,7 +166,7 @@ |
167 | 167 | protected function verifyUpload( ) { |
168 | 168 | $verification = $this->mUpload->verifyUpload( ); |
169 | 169 | if ( $verification['status'] === UploadBase::OK ) { |
170 | | - return; |
| 170 | + return; |
171 | 171 | } |
172 | 172 | |
173 | 173 | // TODO: Move them to ApiBase's message map |
— | — | @@ -212,7 +212,7 @@ |
213 | 213 | } |
214 | 214 | |
215 | 215 | /** |
216 | | - * Check warnings if ignorewarnings is not set. |
| 216 | + * Check warnings if ignorewarnings is not set. |
217 | 217 | * Returns a suitable result array if there were warnings |
218 | 218 | */ |
219 | 219 | protected function checkForWarnings() { |
— | — | @@ -260,7 +260,7 @@ |
261 | 261 | */ |
262 | 262 | protected function performUpload() { |
263 | 263 | global $wgUser; |
264 | | - |
| 264 | + |
265 | 265 | // Use comment as initial page text by default |
266 | 266 | if ( is_null( $this->mParams['text'] ) ) { |
267 | 267 | $this->mParams['text'] = $this->mParams['comment']; |
— | — | @@ -280,7 +280,7 @@ |
281 | 281 | |
282 | 282 | if ( !$status->isGood() ) { |
283 | 283 | $error = $status->getErrorsArray(); |
284 | | - |
| 284 | + |
285 | 285 | if ( count( $error ) == 1 && $error[0][0] == 'async' ) { |
286 | 286 | // The upload can not be performed right now, because the user |
287 | 287 | // requested so |
— | — | @@ -341,12 +341,12 @@ |
342 | 342 | |
343 | 343 | 'sessionkey' => null, |
344 | 344 | ); |
345 | | - |
| 345 | + |
346 | 346 | global $wgAllowAsyncCopyUploads; |
347 | 347 | if ( $wgAllowAsyncCopyUploads ) { |
348 | 348 | $params += array( |
349 | 349 | 'asyncdownload' => false, |
350 | | - 'leavemessage' => false, |
| 350 | + 'leavemessage' => false, |
351 | 351 | ); |
352 | 352 | } |
353 | 353 | return $params; |
— | — | @@ -370,12 +370,12 @@ |
371 | 371 | if ( $wgAllowAsyncCopyUploads ) { |
372 | 372 | $params += array( |
373 | 373 | 'asyncdownload' => 'Make fetching a URL asynchronous', |
374 | | - 'leavemessage' => 'If asyncdownload is used, leave a message on the user talk page if finished', |
| 374 | + 'leavemessage' => 'If asyncdownload is used, leave a message on the user talk page if finished', |
375 | 375 | ); |
376 | 376 | } |
377 | | - |
| 377 | + |
378 | 378 | return $params; |
379 | | - |
| 379 | + |
380 | 380 | } |
381 | 381 | |
382 | 382 | public function getDescription() { |