Index: trunk/phase3/tests/phpunit/includes/GlobalFunctions/wfExpandUrlTest.php |
— | — | @@ -12,16 +12,16 @@ |
13 | 13 | $oldCanServer = $wgCanonicalServer; |
14 | 14 | $wgServer = $server; |
15 | 15 | $wgCanonicalServer = $canServer; |
16 | | - |
| 16 | + |
17 | 17 | // Fake $_SERVER['HTTPS'] if needed |
18 | 18 | if ( $httpsMode ) { |
19 | 19 | $_SERVER['HTTPS'] = 'on'; |
20 | 20 | } else { |
21 | 21 | unset( $_SERVER['HTTPS'] ); |
22 | 22 | } |
23 | | - |
| 23 | + |
24 | 24 | $this->assertEquals( $fullUrl, wfExpandUrl( $shortUrl, $defaultProto ), $message ); |
25 | | - |
| 25 | + |
26 | 26 | // Restore $wgServer and $wgCanonicalServer |
27 | 27 | $wgServer = $oldServer; |
28 | 28 | $wgCanonicalServer = $oldCanServer; |
— | — | @@ -36,7 +36,7 @@ |
37 | 37 | $modes = array( 'http', 'https' ); |
38 | 38 | $servers = array( 'http' => 'http://example.com', 'https' => 'https://example.com', 'protocol-relative' => '//example.com' ); |
39 | 39 | $defaultProtos = array( 'http' => PROTO_HTTP, 'https' => PROTO_HTTPS, 'protocol-relative' => PROTO_RELATIVE, 'current' => PROTO_CURRENT, 'canonical' => PROTO_CANONICAL ); |
40 | | - |
| 40 | + |
41 | 41 | $retval = array(); |
42 | 42 | foreach ( $modes as $mode ) { |
43 | 43 | $httpsMode = $mode == 'https'; |
— | — | @@ -48,14 +48,14 @@ |
49 | 49 | $retval[] = array( 'https://example.com', 'https://example.com', $defaultProto, $server, $canServer, $httpsMode, "Testing fully qualified https URLs (no need to expand) (defaultProto: $protoDesc , wgServer: $server, wgCanonicalServer: $canServer, current request protocol: $mode )" ); |
50 | 50 | # Would be nice to support this, see fixme on wfExpandUrl() |
51 | 51 | $retval[] = array( "wiki/FooBar", 'wiki/FooBar', $defaultProto, $server, $canServer, $httpsMode, "Test non-expandable relative URLs (defaultProto: $protoDesc , wgServer: $server, wgCanonicalServer: $canServer, current request protocol: $mode )" ); |
52 | | - |
| 52 | + |
53 | 53 | // Determine expected protocol |
54 | 54 | $p = $protoDesc . ':'; // default case |
55 | 55 | if ( $protoDesc == 'protocol-relative' ) { |
56 | 56 | $p = ''; |
57 | | - } else if ( $protoDesc == 'current' ) { |
| 57 | + } elseif ( $protoDesc == 'current' ) { |
58 | 58 | $p = "$mode:"; |
59 | | - } else if ( $protoDesc == 'canonical' ) { |
| 59 | + } elseif ( $protoDesc == 'canonical' ) { |
60 | 60 | $p = "$canServerMode:"; |
61 | 61 | } else { |
62 | 62 | $p = $protoDesc . ':'; |
— | — | @@ -63,12 +63,12 @@ |
64 | 64 | // Determine expected server name |
65 | 65 | if ( $protoDesc == 'canonical' ) { |
66 | 66 | $srv = $canServer; |
67 | | - } else if ( $serverDesc == 'protocol-relative' ) { |
| 67 | + } elseif ( $serverDesc == 'protocol-relative' ) { |
68 | 68 | $srv = $p . $server; |
69 | 69 | } else { |
70 | 70 | $srv = $server; |
71 | 71 | } |
72 | | - |
| 72 | + |
73 | 73 | $retval[] = array( "$p//wikipedia.org", '//wikipedia.org', $defaultProto, $server, $canServer, $httpsMode, "Test protocol-relative URL (defaultProto: $protoDesc, wgServer: $server, wgCanonicalServer: $canServer, current request protocol: $mode )" ); |
74 | 74 | $retval[] = array( "$srv/wiki/FooBar", '/wiki/FooBar', $defaultProto, $server, $canServer, $httpsMode, "Testing expanding URL beginning with / (defaultProto: $protoDesc , wgServer: $server, wgCanonicalServer: $canServer, current request protocol: $mode )" ); |
75 | 75 | } |
Index: trunk/phase3/includes/UserMailer.php |
— | — | @@ -197,7 +197,7 @@ |
198 | 198 | $ret = wfRunHooks( 'AlternateUserMailer', array( $headers, $to, $from, $subject, $body ) ); |
199 | 199 | if ( $ret === false ) { |
200 | 200 | return Status::newGood(); |
201 | | - } else if ( $ret !== true ) { |
| 201 | + } elseif ( $ret !== true ) { |
202 | 202 | return Status::newFatal( 'php-mail-error', $ret ); |
203 | 203 | } |
204 | 204 | |
Index: trunk/phase3/includes/resourceloader/ResourceLoaderStartUpModule.php |
— | — | @@ -168,7 +168,7 @@ |
169 | 169 | } |
170 | 170 | // Modules with a group but no foreign source pass four arguments (name, timestamp, dependencies, group) |
171 | 171 | // to mw.loader.register() |
172 | | - else if ( $module->getSource() === 'local' ) { |
| 172 | + elseif ( $module->getSource() === 'local' ) { |
173 | 173 | $registrations[] = array( |
174 | 174 | $name, $mtime, $module->getDependencies(), $module->getGroup() ); |
175 | 175 | } |
Index: trunk/phase3/includes/specials/SpecialAllmessages.php |
— | — | @@ -411,7 +411,7 @@ |
412 | 412 | function getCellAttrs( $field, $value ){ |
413 | 413 | if( $this->mCurrentRow->am_customised && $field == 'am_title' ){ |
414 | 414 | return array( 'rowspan' => '2', 'class' => $field ); |
415 | | - } else if( $field == 'am_title' ) { |
| 415 | + } elseif( $field == 'am_title' ) { |
416 | 416 | return array( 'class' => $field ); |
417 | 417 | } else { |
418 | 418 | return array( 'lang' => $this->langcode, 'dir' => $this->lang->getDir(), 'class' => $field ); |
Index: trunk/phase3/includes/specials/SpecialPasswordReset.php |
— | — | @@ -50,7 +50,7 @@ |
51 | 51 | $error = $this->canChangePassword( $user ); |
52 | 52 | if ( is_string( $error ) ) { |
53 | 53 | throw new ErrorPageError( 'internalerror', $error ); |
54 | | - } else if ( !$error ) { |
| 54 | + } elseif ( !$error ) { |
55 | 55 | throw new ErrorPageError( 'internalerror', 'resetpass_forbidden' ); |
56 | 56 | } |
57 | 57 | |
— | — | @@ -280,7 +280,7 @@ |
281 | 281 | |
282 | 282 | $this->getOutput()->addHTML( Html::rawElement( 'pre', array(), $this->email->escaped() ) ); |
283 | 283 | } |
284 | | - |
| 284 | + |
285 | 285 | $this->getOutput()->addWikiMsg( 'passwordreset-emailsent' ); |
286 | 286 | $this->getOutput()->returnToMain(); |
287 | 287 | } |
Index: trunk/phase3/languages/classes/LanguageSr.php |
— | — | @@ -191,7 +191,7 @@ |
192 | 192 | |
193 | 193 | if( $variant == 'sr-ec' ) { |
194 | 194 | return (boolean) ($numCyrillic > $numLatin); |
195 | | - } else if( $variant == 'sr-el' ) { |
| 195 | + } elseif( $variant == 'sr-el' ) { |
196 | 196 | return (boolean) ($numLatin > $numCyrillic); |
197 | 197 | } else { |
198 | 198 | return false; |