Index: trunk/phase3/includes/Setup.php |
— | — | @@ -22,7 +22,7 @@ |
23 | 23 | wfProfileIn( $fname ); |
24 | 24 | |
25 | 25 | // Check to see if we are at the file scope |
26 | | -if ( !isset( $wgVersion ) ) { |
| 26 | +if( !isset( $wgVersion ) ) { |
27 | 27 | echo "Error, Setup.php must be included from the file scope, after DefaultSettings.php\n"; |
28 | 28 | die( 1 ); |
29 | 29 | } |
— | — | @@ -33,9 +33,9 @@ |
34 | 34 | |
35 | 35 | if( $wgArticlePath === false ) { |
36 | 36 | if( $wgUsePathInfo ) { |
37 | | - $wgArticlePath = "$wgScript/$1"; |
| 37 | + $wgArticlePath = "$wgScript/$1"; |
38 | 38 | } else { |
39 | | - $wgArticlePath = "$wgScript?title=$1"; |
| 39 | + $wgArticlePath = "$wgScript?title=$1"; |
40 | 40 | } |
41 | 41 | } |
42 | 42 | |
— | — | @@ -54,7 +54,7 @@ |
55 | 55 | if( $wgReadOnlyFile === false ) $wgReadOnlyFile = "{$wgUploadDirectory}/lock_yBgMBwiR"; |
56 | 56 | if( $wgFileCacheDirectory === false ) $wgFileCacheDirectory = "{$wgUploadDirectory}/cache"; |
57 | 57 | |
58 | | -if ( empty( $wgFileStore['deleted']['directory'] ) ) { |
| 58 | +if( empty( $wgFileStore['deleted']['directory'] ) ) { |
59 | 59 | $wgFileStore['deleted']['directory'] = "{$wgUploadDirectory}/deleted"; |
60 | 60 | } |
61 | 61 | |
— | — | @@ -78,7 +78,7 @@ |
79 | 79 | /** |
80 | 80 | * Initialise $wgLocalFileRepo from backwards-compatible settings |
81 | 81 | */ |
82 | | -if ( !$wgLocalFileRepo ) { |
| 82 | +if( !$wgLocalFileRepo ) { |
83 | 83 | $wgLocalFileRepo = array( |
84 | 84 | 'class' => 'LocalRepo', |
85 | 85 | 'name' => 'local', |
— | — | @@ -95,8 +95,8 @@ |
96 | 96 | /** |
97 | 97 | * Initialise shared repo from backwards-compatible settings |
98 | 98 | */ |
99 | | -if ( $wgUseSharedUploads ) { |
100 | | - if ( $wgSharedUploadDBname ) { |
| 99 | +if( $wgUseSharedUploads ) { |
| 100 | + if( $wgSharedUploadDBname ) { |
101 | 101 | $wgForeignFileRepos[] = array( |
102 | 102 | 'class' => 'ForeignDBRepo', |
103 | 103 | 'name' => 'shared', |
— | — | @@ -130,9 +130,7 @@ |
131 | 131 | ); |
132 | 132 | } |
133 | 133 | } |
134 | | -if ( !class_exists( 'AutoLoader' ) ) { |
135 | | - require_once( "$IP/includes/AutoLoader.php" ); |
136 | | -} |
| 134 | +require_once( "$IP/includes/AutoLoader.php" ); |
137 | 135 | |
138 | 136 | wfProfileIn( $fname.'-exception' ); |
139 | 137 | require_once( "$IP/includes/Exception.php" ); |
— | — | @@ -156,9 +154,9 @@ |
157 | 155 | $wgRequest = new WebRequest; |
158 | 156 | |
159 | 157 | # Useful debug output |
160 | | -if ( $wgCommandLineMode ) { |
| 158 | +if( $wgCommandLineMode ) { |
161 | 159 | wfDebug( "\n\nStart command line script $self\n" ); |
162 | | -} elseif ( function_exists( 'getallheaders' ) ) { |
| 160 | +} elseif( function_exists( 'getallheaders' ) ) { |
163 | 161 | wfDebug( "\n\nStart request\n" ); |
164 | 162 | wfDebug( $_SERVER['REQUEST_METHOD'] . ' ' . $_SERVER['REQUEST_URI'] . "\n" ); |
165 | 163 | $headers = getallheaders(); |
— | — | @@ -183,13 +181,13 @@ |
184 | 182 | } |
185 | 183 | } |
186 | 184 | |
187 | | -if ( $wgSkipSkin ) { |
| 185 | +if( $wgSkipSkin ) { |
188 | 186 | $wgSkipSkins[] = $wgSkipSkin; |
189 | 187 | } |
190 | 188 | |
191 | 189 | $wgUseEnotif = $wgEnotifUserTalk || $wgEnotifWatchlist; |
192 | 190 | |
193 | | -if($wgMetaNamespace === FALSE) { |
| 191 | +if( $wgMetaNamespace === FALSE ) { |
194 | 192 | $wgMetaNamespace = str_replace( ' ', '_', $wgSitename ); |
195 | 193 | } |
196 | 194 | |
— | — | @@ -236,7 +234,7 @@ |
237 | 235 | if( !wfIniGetBool( 'session.auto_start' ) ) |
238 | 236 | session_name( $wgSessionName ? $wgSessionName : $wgCookiePrefix . '_session' ); |
239 | 237 | |
240 | | -if( !$wgCommandLineMode && ( $wgRequest->checkSessionCookie() || isset( $_COOKIE[$wgCookiePrefix.'Token'] ) ) ) { |
| 238 | +if( !$wgCommandLineMode && ( $wgRequest->checkSessionCookie() || isset($_COOKIE[$wgCookiePrefix.'Token']) ) ) { |
241 | 239 | wfIncrStats( 'request_with_session' ); |
242 | 240 | wfSetupSession(); |
243 | 241 | $wgSessionStarted = true; |
— | — | @@ -268,7 +266,7 @@ |
269 | 267 | # Entries can be added to this variable during the inclusion |
270 | 268 | # of the extension file. Skins can then perform any necessary initialisation. |
271 | 269 | # |
272 | | -foreach ( $wgSkinExtensionFunctions as $func ) { |
| 270 | +foreach( $wgSkinExtensionFunctions as $func ) { |
273 | 271 | call_user_func( $func ); |
274 | 272 | } |
275 | 273 | |
— | — | @@ -284,8 +282,8 @@ |
285 | 283 | $wgDeferredUpdateList = array(); |
286 | 284 | $wgPostCommitUpdateList = array(); |
287 | 285 | |
288 | | -if ( $wgAjaxWatch ) $wgAjaxExportList[] = 'wfAjaxWatch'; |
289 | | -if ( $wgAjaxUploadDestCheck ) $wgAjaxExportList[] = 'UploadForm::ajaxGetExistsWarning'; |
| 286 | +if( $wgAjaxWatch ) $wgAjaxExportList[] = 'wfAjaxWatch'; |
| 287 | +if( $wgAjaxUploadDestCheck ) $wgAjaxExportList[] = 'UploadForm::ajaxGetExistsWarning'; |
290 | 288 | if( $wgAjaxLicensePreview ) |
291 | 289 | $wgAjaxExportList[] = 'UploadForm::ajaxGetLicensePreview'; |
292 | 290 | |
— | — | @@ -300,7 +298,7 @@ |
301 | 299 | # Entries should be added to this variable during the inclusion |
302 | 300 | # of the extension file. This allows the extension to perform |
303 | 301 | # any necessary initialisation in the fully initialised environment |
304 | | -foreach ( $wgExtensionFunctions as $func ) { |
| 302 | +foreach( $wgExtensionFunctions as $func ) { |
305 | 303 | $profName = $fname.'-extensions-'.strval( $func ); |
306 | 304 | wfProfileIn( $profName ); |
307 | 305 | call_user_func( $func ); |