Index: trunk/phase3/includes/api/ApiParse.php |
— | — | @@ -54,10 +54,10 @@ |
55 | 55 | // $title parameter in Parser::parse isn't enough *sigh* |
56 | 56 | global $wgParser, $wgUser, $wgTitle, $wgEnableParserCache, $wgLang; |
57 | 57 | |
58 | | - //Current unncessary, code to act as a safeguard against any change in current behaviour of uselang breaks |
| 58 | + // Current unncessary, code to act as a safeguard against any change in current behaviour of uselang breaks |
59 | 59 | $oldLang = null; |
60 | 60 | if ( isset( $params['uselang'] ) && $params['uselang'] != $wgLang->getCode() ) { |
61 | | - $oldLang = $wgLang; //Backup wgLang |
| 61 | + $oldLang = $wgLang; // Backup wgLang |
62 | 62 | $wgLang = Language::factory( $params['uselang'] ); |
63 | 63 | } |
64 | 64 | |
— | — | @@ -214,7 +214,7 @@ |
215 | 215 | $result->addValue( null, $this->getModuleName(), $result_array ); |
216 | 216 | |
217 | 217 | if ( !is_null( $oldLang ) ) { |
218 | | - $wgLang = $oldLang; //Reset $wgLang to $oldLang |
| 218 | + $wgLang = $oldLang; // Reset $wgLang to $oldLang |
219 | 219 | } |
220 | 220 | } |
221 | 221 | |
Index: trunk/phase3/includes/api/ApiQueryBacklinks.php |
— | — | @@ -246,7 +246,7 @@ |
247 | 247 | if ( $this->hasNS ) { |
248 | 248 | $parentID = $this->pageMap[$row-> { $this->bl_ns } ][$row-> { $this->bl_title } ]; |
249 | 249 | } else { |
250 | | - $parentID = $this->pageMap[NS_IMAGE][$row->{$this->bl_title}]; |
| 250 | + $parentID = $this->pageMap[NS_IMAGE][$row-> { $this->bl_title } ]; |
251 | 251 | } |
252 | 252 | $this->continueStr = $this->getContinueRedirStr( $parentID, $row->page_id ); |
253 | 253 | break; |
Index: trunk/phase3/includes/api/ApiRollback.php |
— | — | @@ -155,7 +155,7 @@ |
156 | 156 | |
157 | 157 | $params = $this->extractRequestParams(); |
158 | 158 | if ( !isset( $params['title'] ) ) { |
159 | | - $this->dieUsageMsg( array( 'missingparam', 'title' ) ); |
| 159 | + $this->dieUsageMsg( array( 'missingparam', 'title' ) ); |
160 | 160 | } |
161 | 161 | |
162 | 162 | $this->mTitleObj = Title::newFromText( $params['title'] ); |
Index: trunk/phase3/includes/api/ApiQueryAllmessages.php |
— | — | @@ -46,7 +46,7 @@ |
47 | 47 | |
48 | 48 | $oldLang = null; |
49 | 49 | if ( !is_null( $params['lang'] ) && $params['lang'] != $wgLang->getCode() ) { |
50 | | - $oldLang = $wgLang; //Keep $wgLang for restore later |
| 50 | + $oldLang = $wgLang; // Keep $wgLang for restore later |
51 | 51 | $wgLang = Language::factory( $params['lang'] ); |
52 | 52 | } |
53 | 53 | |
— | — | @@ -125,7 +125,7 @@ |
126 | 126 | $result->setIndexedTagName_internal( array( 'query', $this->getModuleName() ), 'message' ); |
127 | 127 | |
128 | 128 | if ( !is_null( $oldLang ) ) { |
129 | | - $wgLang = $oldLang; //Restore $oldLang |
| 129 | + $wgLang = $oldLang; // Restore $oldLang |
130 | 130 | } |
131 | 131 | } |
132 | 132 | |
Index: trunk/phase3/includes/api/ApiFormatYaml_spyc.php |
— | — | @@ -185,7 +185,7 @@ |
186 | 186 | else |
187 | 187 | $string = $spaces . "-\n"; |
188 | 188 | } else { |
189 | | - if ($key == '*') //bug 21922 - Quote asterix used as keys |
| 189 | + if ( $key == '*' ) // bug 21922 - Quote asterix used as keys |
190 | 190 | $key = "'*'"; |
191 | 191 | |
192 | 192 | // It's mapped |
Index: trunk/phase3/includes/api/ApiMain.php |
— | — | @@ -168,7 +168,7 @@ |
169 | 169 | |
170 | 170 | $this->mRequest = &$request; |
171 | 171 | |
172 | | - $this->mSquidMaxage = -1; // flag for executeActionWithErrorHandling() |
| 172 | + $this->mSquidMaxage = - 1; // flag for executeActionWithErrorHandling() |
173 | 173 | $this->mCommit = false; |
174 | 174 | } |
175 | 175 | |
— | — | @@ -451,7 +451,7 @@ |
452 | 452 | * @param $params Array an array containing the request parameters. |
453 | 453 | * @return boolean True on success, false should exit immediately |
454 | 454 | */ |
455 | | - protected function checkMaxLag($module, $params) { |
| 455 | + protected function checkMaxLag( $module, $params ) { |
456 | 456 | if ( $module->shouldCheckMaxlag() && isset( $params['maxlag'] ) ) { |
457 | 457 | // Check for maxlag |
458 | 458 | global $wgShowHostnames; |
— | — | @@ -476,7 +476,7 @@ |
477 | 477 | * Check for sufficient permissions to execute |
478 | 478 | * @param $module object An Api module |
479 | 479 | */ |
480 | | - protected function checkExecutePermissions($module) { |
| 480 | + protected function checkExecutePermissions( $module ) { |
481 | 481 | global $wgUser, $wgGroupPermissions; |
482 | 482 | if ( $module->isReadMode() && !$wgGroupPermissions['*']['read'] && !$wgUser->isAllowed( 'read' ) ) |
483 | 483 | { |
— | — | @@ -500,7 +500,7 @@ |
501 | 501 | * @param $module object An Api module |
502 | 502 | * @param $params Array an array with the request parameters |
503 | 503 | */ |
504 | | - protected function setupExternalResponse($module, $params) { |
| 504 | + protected function setupExternalResponse( $module, $params ) { |
505 | 505 | // Ignore mustBePosted() for internal calls |
506 | 506 | if ( $module->mustBePosted() && !$this->mRequest->wasPosted() ) { |
507 | 507 | $this->dieUsageMsg( array( 'mustbeposted', $this->mAction ) ); |
— | — | @@ -525,12 +525,12 @@ |
526 | 526 | $params = $this->setupExecuteAction(); |
527 | 527 | $module = $this->setupModule(); |
528 | 528 | |
529 | | - $this->checkExecutePermissions($module); |
| 529 | + $this->checkExecutePermissions( $module ); |
530 | 530 | |
531 | | - if(!$this->checkMaxLag($module, $params)) return; |
| 531 | + if ( !$this->checkMaxLag( $module, $params ) ) return; |
532 | 532 | |
533 | 533 | if ( !$this->mInternalMode ) { |
534 | | - $this->setupExternalResponse($module, $params); |
| 534 | + $this->setupExternalResponse( $module, $params ); |
535 | 535 | } |
536 | 536 | |
537 | 537 | // Execute |
Index: trunk/phase3/includes/api/ApiQueryImageInfo.php |
— | — | @@ -288,11 +288,11 @@ |
289 | 289 | ), |
290 | 290 | 'urlwidth' => array( |
291 | 291 | ApiBase::PARAM_TYPE => 'integer', |
292 | | - ApiBase::PARAM_DFLT => -1 |
| 292 | + ApiBase::PARAM_DFLT => - 1 |
293 | 293 | ), |
294 | 294 | 'urlheight' => array( |
295 | 295 | ApiBase::PARAM_TYPE => 'integer', |
296 | | - ApiBase::PARAM_DFLT => -1 |
| 296 | + ApiBase::PARAM_DFLT => - 1 |
297 | 297 | ), |
298 | 298 | 'continue' => null, |
299 | 299 | ); |
Index: trunk/phase3/includes/api/ApiEmailUser.php |
— | — | @@ -61,9 +61,9 @@ |
62 | 62 | } |
63 | 63 | |
64 | 64 | $data = array( |
65 | | - 'Target' => $targetUser->getName(), |
66 | | - 'Text' => $params['text'], |
67 | | - 'Subject' => $params['subject'], |
| 65 | + 'Target' => $targetUser->getName(), |
| 66 | + 'Text' => $params['text'], |
| 67 | + 'Subject' => $params['subject'], |
68 | 68 | 'CCMe' => $params['ccme'], |
69 | 69 | ); |
70 | 70 | $retval = SpecialEmailuser::submit( $data ); |
Index: trunk/phase3/includes/api/ApiPageSet.php |
— | — | @@ -79,7 +79,7 @@ |
80 | 80 | $this->mPendingRedirectIDs = array(); |
81 | 81 | } |
82 | 82 | |
83 | | - $this->mFakePageId = -1; |
| 83 | + $this->mFakePageId = - 1; |
84 | 84 | } |
85 | 85 | |
86 | 86 | /** |
Index: trunk/phase3/includes/api/ApiBase.php |
— | — | @@ -475,7 +475,7 @@ |
476 | 476 | $params = $this->getFinalParams(); |
477 | 477 | $results = array(); |
478 | 478 | |
479 | | - if( $params ) { // getFinalParams() can return false |
| 479 | + if ( $params ) { // getFinalParams() can return false |
480 | 480 | foreach ( $params as $paramName => $paramSettings ) { |
481 | 481 | $results[$paramName] = $this->getParameterFromSettings( $paramName, $paramSettings, $parseLimit ); |
482 | 482 | } |
— | — | @@ -559,7 +559,7 @@ |
560 | 560 | } |
561 | 561 | # If no user option was passed, use watchdefault or watchcreation |
562 | 562 | if ( is_null( $userOption ) ) { |
563 | | - $userOption = $titleObj->exists() |
| 563 | + $userOption = $titleObj->exists() |
564 | 564 | ? 'watchdefault' : 'watchcreations'; |
565 | 565 | } |
566 | 566 | # If the corresponding user option is true, watch, else no change |
— | — | @@ -581,7 +581,7 @@ |
582 | 582 | */ |
583 | 583 | protected function setWatch ( $watch, $titleObj, $userOption = null ) { |
584 | 584 | $value = $this->getWatchlistValue( $watch, $titleObj, $userOption ); |
585 | | - if( $value === null ) { |
| 585 | + if ( $value === null ) { |
586 | 586 | return; |
587 | 587 | } |
588 | 588 | |
— | — | @@ -705,9 +705,9 @@ |
706 | 706 | $value = wfTimestamp( TS_MW, $value ); |
707 | 707 | break; |
708 | 708 | case 'user': |
709 | | - if( !is_array( $value ) ) $value = array( $value ); |
| 709 | + if ( !is_array( $value ) ) $value = array( $value ); |
710 | 710 | |
711 | | - foreach( $value as $key => $val ) { |
| 711 | + foreach ( $value as $key => $val ) { |
712 | 712 | $title = Title::makeTitleSafe( NS_USER, $val ); |
713 | 713 | if ( is_null( $title ) ) { |
714 | 714 | $this->dieUsage( "Invalid value for user parameter $encParamName", "baduser_{$encParamName}" ); |
— | — | @@ -715,7 +715,7 @@ |
716 | 716 | $value[$key] = $title->getText(); |
717 | 717 | } |
718 | 718 | |
719 | | - if( !$multi ) $value = $value[0]; |
| 719 | + if ( !$multi ) $value = $value[0]; |
720 | 720 | |
721 | 721 | break; |
722 | 722 | default: |
Index: trunk/phase3/includes/api/ApiUpload.php |
— | — | @@ -241,7 +241,7 @@ |
242 | 242 | $this->verifyUpload(); |
243 | 243 | |
244 | 244 | $warnings = $this->checkForWarnings(); |
245 | | - if( isset($warnings) ) return $warnings; |
| 245 | + if ( isset( $warnings ) ) return $warnings; |
246 | 246 | |
247 | 247 | // Use comment as initial page text by default |
248 | 248 | if ( is_null( $this->mParams['text'] ) ) { |