Index: trunk/phase3/includes/api/ApiParse.php |
— | — | @@ -452,7 +452,7 @@ |
453 | 453 | array( 'code' => 'missingrev', 'info' => 'There is no revision ID oldid' ), |
454 | 454 | array( 'code' => 'permissiondenied', 'info' => 'You don\'t have permission to view deleted revisions' ), |
455 | 455 | array( 'code' => 'missingtitle', 'info' => 'The page you specified doesn\'t exist' ), |
456 | | - array( 'code' => 'nosuchsection', 'info' => 'There is no section sectionnumber in page'), |
| 456 | + array( 'code' => 'nosuchsection', 'info' => 'There is no section sectionnumber in page' ), |
457 | 457 | array( 'nosuchpageid' ), |
458 | 458 | ) ); |
459 | 459 | } |
Index: trunk/phase3/includes/api/ApiQueryFilearchive.php |
— | — | @@ -147,13 +147,13 @@ |
148 | 148 | $file['height'] = $row->fa_height; |
149 | 149 | $file['width'] = $row->fa_width; |
150 | 150 | } |
151 | | - if ( $fld_description ){ |
| 151 | + if ( $fld_description ) { |
152 | 152 | $file['description'] = $row->fa_description; |
153 | 153 | } |
154 | | - if ( $fld_metadata ){ |
| 154 | + if ( $fld_metadata ) { |
155 | 155 | $file['metadata'] = $row->fa_metadata ? ApiQueryImageInfo::processMetaData( unserialize( $row->fa_metadata ), $result ) : null; |
156 | 156 | } |
157 | | - if ( $fld_bitdepth ){ |
| 157 | + if ( $fld_bitdepth ) { |
158 | 158 | $file['bitdepth'] = $row->fa_bits; |
159 | 159 | } |
160 | 160 | if ( $fld_mime ) { |
Index: trunk/phase3/includes/api/ApiEditPage.php |
— | — | @@ -299,6 +299,7 @@ |
300 | 300 | |
301 | 301 | case EditPage::AS_SUCCESS_NEW_ARTICLE: |
302 | 302 | $r['new'] = ''; |
| 303 | + |
303 | 304 | case EditPage::AS_SUCCESS_UPDATE: |
304 | 305 | $r['result'] = 'Success'; |
305 | 306 | $r['pageid'] = intval( $titleObj->getArticleID() ); |
— | — | @@ -326,7 +327,7 @@ |
327 | 328 | // This usually means some kind of race condition |
328 | 329 | // or DB weirdness occurred. |
329 | 330 | if ( is_array( $result ) && count( $result ) > 0 ) { |
330 | | - $this->dieUsageMsg( array( 'unknownerror', $result[0][0] ) ); |
| 331 | + $this->dieUsageMsg( array( 'unknownerror', $result[0][0] ) ); |
331 | 332 | } |
332 | 333 | |
333 | 334 | // Unknown error, but no specific error message |
Index: trunk/phase3/includes/api/ApiQueryLogEvents.php |
— | — | @@ -231,7 +231,7 @@ |
232 | 232 | $vals['pageid'] = intval( $row->page_id ); |
233 | 233 | } |
234 | 234 | |
235 | | - if( $this->fld_title || $this->fld_parsedcomment ) { |
| 235 | + if ( $this->fld_title || $this->fld_parsedcomment ) { |
236 | 236 | $title = Title::makeTitle( $row->log_namespace, $row->log_title ); |
237 | 237 | } |
238 | 238 | |
Index: trunk/phase3/includes/api/ApiQueryImageInfo.php |
— | — | @@ -213,13 +213,13 @@ |
214 | 214 | if ( $mto && !$mto->isError() ) { |
215 | 215 | $vals['thumburl'] = wfExpandUrl( $mto->getUrl() ); |
216 | 216 | |
217 | | - //bug 23834 - If the URL's are the same, we haven't resized it, so shouldn't give the wanted |
218 | | - //thumbnail sizes for the thumbnail actual size |
| 217 | + // bug 23834 - If the URL's are the same, we haven't resized it, so shouldn't give the wanted |
| 218 | + // thumbnail sizes for the thumbnail actual size |
219 | 219 | if ( $mto->getUrl() !== $file->getUrl() ) { |
220 | | - $vals['thumbwidth'] = intval( $mto->getWidth() ); |
| 220 | + $vals['thumbwidth'] = intval( $mto->getWidth() ); |
221 | 221 | $vals['thumbheight'] = intval( $mto->getHeight() ); |
222 | 222 | } else { |
223 | | - $vals['thumbwidth'] = intval( $file->getWidth() ); |
| 223 | + $vals['thumbwidth'] = intval( $file->getWidth() ); |
224 | 224 | $vals['thumbheight'] = intval( $file->getHeight() ); |
225 | 225 | } |
226 | 226 | |
Index: trunk/phase3/includes/api/ApiQueryIWBacklinks.php |
— | — | @@ -143,7 +143,7 @@ |
144 | 144 | } |
145 | 145 | |
146 | 146 | public function getDescription() { |
147 | | - return array('Find all pages that link to the given interwiki link.', |
| 147 | + return array( 'Find all pages that link to the given interwiki link.', |
148 | 148 | 'Can be used to find all links with a prefix, or', |
149 | 149 | 'all links to a title (any prefix).', |
150 | 150 | 'Using neither parameter is effectively "All IW Links"', |
Index: trunk/phase3/includes/api/ApiQueryWatchlist.php |
— | — | @@ -258,8 +258,8 @@ |
259 | 259 | } |
260 | 260 | |
261 | 261 | if ( $this->fld_notificationtimestamp ) { |
262 | | - $vals['notificationtimestamp'] = ( $row->wl_notificationtimestamp == null ) |
263 | | - ? '' |
| 262 | + $vals['notificationtimestamp'] = ( $row->wl_notificationtimestamp == null ) |
| 263 | + ? '' |
264 | 264 | : wfTimestamp( TS_ISO_8601, $row->wl_notificationtimestamp ); |
265 | 265 | } |
266 | 266 | |
Index: trunk/phase3/includes/api/ApiBase.php |
— | — | @@ -317,12 +317,13 @@ |
318 | 318 | if ( is_array( $type ) ) { |
319 | 319 | $choices = array(); |
320 | 320 | $nothingPrompt = false; |
321 | | - foreach ( $type as $t ) |
| 321 | + foreach ( $type as $t ) { |
322 | 322 | if ( $t === '' ) { |
323 | 323 | $nothingPrompt = 'Can be empty, or '; |
324 | 324 | } else { |
325 | 325 | $choices[] = $t; |
326 | 326 | } |
| 327 | + } |
327 | 328 | $desc .= $paramPrefix . $nothingPrompt . $prompt . implode( ', ', $choices ); |
328 | 329 | } else { |
329 | 330 | switch ( $type ) { |
— | — | @@ -711,8 +712,10 @@ |
712 | 713 | $value = wfTimestamp( TS_MW, $value ); |
713 | 714 | break; |
714 | 715 | case 'user': |
715 | | - if ( !is_array( $value ) ) $value = array( $value ); |
716 | | - |
| 716 | + if ( !is_array( $value ) ) { |
| 717 | + $value = array( $value ); |
| 718 | + } |
| 719 | + |
717 | 720 | foreach ( $value as $key => $val ) { |
718 | 721 | $title = Title::makeTitleSafe( NS_USER, $val ); |
719 | 722 | if ( is_null( $title ) ) { |
— | — | @@ -721,9 +724,10 @@ |
722 | 725 | $value[$key] = $title->getText(); |
723 | 726 | } |
724 | 727 | |
725 | | - if ( !$multi ) $value = $value[0]; |
726 | | - |
727 | | - break; |
| 728 | + if ( !$multi ) { |
| 729 | + $value = $value[0]; |
| 730 | + } |
| 731 | + break; |
728 | 732 | default: |
729 | 733 | ApiBase::dieDebug( __METHOD__, "Param $encParamName's type is unknown - $type" ); |
730 | 734 | } |
— | — | @@ -928,7 +932,7 @@ |
929 | 933 | 'userrights-nodatabase' => array( 'code' => 'nosuchdatabase', 'info' => "Database ``\$1'' does not exist or is not local" ), |
930 | 934 | 'nouserspecified' => array( 'code' => 'invaliduser', 'info' => "Invalid username ``\$1''" ), |
931 | 935 | 'noname' => array( 'code' => 'invaliduser', 'info' => "Invalid username ``\$1''" ), |
932 | | - 'summaryrequired' => array( 'code' => 'summaryrequired', 'info' => 'Summary required'), |
| 936 | + 'summaryrequired' => array( 'code' => 'summaryrequired', 'info' => 'Summary required' ), |
933 | 937 | |
934 | 938 | // API-specific messages |
935 | 939 | 'readrequired' => array( 'code' => 'readapidenied', 'info' => "You need read permission to use this module" ), |
Index: trunk/phase3/includes/api/ApiUpload.php |
— | — | @@ -99,7 +99,7 @@ |
100 | 100 | $this->mParams['comment'], |
101 | 101 | $this->mParams['watchlist'], |
102 | 102 | $this->mParams['ignorewarnings'], |
103 | | - $async); |
| 103 | + $async ); |
104 | 104 | |
105 | 105 | $this->checkPermissions( $wgUser ); |
106 | 106 | if ( $async ) { |