Fixed spacing
authorumherirrender <umherirrender_de.wp@web.de>
Thu, 9 May 2013 17:48:10 +0000 (19:48 +0200)
committerumherirrender <umherirrender_de.wp@web.de>
Thu, 9 May 2013 17:48:10 +0000 (19:48 +0200)
Added spaces around some parenthesis

Change-Id: If1e50e2a7b0046e91c0bbce8bf6641d8b2446a1d

includes/WebStart.php
includes/parser/CoreParserFunctions.php
includes/specials/SpecialActiveusers.php
includes/specials/SpecialRedirect.php
includes/upload/UploadBase.php
maintenance/copyFileBackend.php
maintenance/rebuildLocalisationCache.php
profileinfo.php
tests/phpunit/includes/db/TestORMRowTest.php

index 81e7c13..ead6d77 100644 (file)
@@ -146,7 +146,7 @@ wfProfileIn( 'WebStart.php-ob_start' );
 # that would cause us to potentially mix gzip and non-gzip output, creating a
 # big mess.
 if ( !defined( 'MW_NO_OUTPUT_BUFFER' ) && ob_get_level() == 0 ) {
-       require_once "$IP/includes/OutputHandler.php" ;
+       require_once "$IP/includes/OutputHandler.php";
        ob_start( 'wfOutputHandler' );
 }
 wfProfileOut( 'WebStart.php-ob_start' );
index 493611a..be945f7 100644 (file)
@@ -701,7 +701,7 @@ class CoreParserFunctions {
                        # We are on current page (and not in PST), so
                        # take length of input to parser.
                        $length = $parser->mInputSize;
-               } elseif( isset( $cache[$page] ) ) {
+               } elseif ( isset( $cache[$page] ) ) {
                        $length = $cache[$page];
                } elseif ( $parser->incrementExpensiveFunctionCount() ) {
                        $rev = Revision::newFromTitle( $title, false, Revision::READ_NORMAL );
index a2978e3..63131c1 100644 (file)
@@ -62,7 +62,7 @@ class ActiveUsersPager extends UsersPager {
                $this->requestedUser = '';
                if ( $un != '' ) {
                        $username = Title::makeTitleSafe( NS_USER, $un );
-                       if( !is_null( $username ) ) {
+                       if ( !is_null( $username ) ) {
                                $this->requestedUser = $username->getText();
                        }
                }
@@ -96,7 +96,7 @@ class ActiveUsersPager extends UsersPager {
                $conds = array( 'rc_user > 0' ); // Users - no anons
                $conds[] = 'rc_log_type IS NULL OR rc_log_type != ' . $dbr->addQuotes( 'newusers' );
                $conds[] = 'rc_timestamp >= ' . $dbr->addQuotes(
-                       $dbr->timestamp( wfTimestamp( TS_UNIX ) - $this->RCMaxAge*24*3600 ) );
+                       $dbr->timestamp( wfTimestamp( TS_UNIX ) - $this->RCMaxAge * 24 * 3600 ) );
 
                if ( $this->requestedUser != '' ) {
                        $conds[] = 'rc_user_text >= ' . $dbr->addQuotes( $this->requestedUser );
@@ -163,7 +163,7 @@ class ActiveUsersPager extends UsersPager {
                $user = User::newFromId( $row->user_id );
 
                // User right filter
-               foreach( $this->hideRights as $right ) {
+               foreach ( $this->hideRights as $right ) {
                        // Calling User::getRights() within the loop so that
                        // if the hideRights() filter is empty, we don't have to
                        // trigger the lazy-init of the big userrights array in the
@@ -177,7 +177,7 @@ class ActiveUsersPager extends UsersPager {
                // Note: This is a different loop than for user rights,
                // because we're reusing it to build the group links
                // at the same time
-               foreach( $user->getGroups() as $group ) {
+               foreach ( $user->getGroups() as $group ) {
                        if ( in_array( $group, $this->hideGroups ) ) {
                                return '';
                        }
index 210cee6..2681207 100644 (file)
@@ -145,7 +145,7 @@ class SpecialRedirect extends FormSpecialPage {
         */
        function dispatch() {
                // the various namespaces supported by Special:Redirect
-               switch( $this->mType ) {
+               switch ( $this->mType ) {
                case 'user':
                        $url = $this->dispatchUser();
                        break;
@@ -187,7 +187,7 @@ class SpecialRedirect extends FormSpecialPage {
                        'options' => array(),
                        'default' => current( array_keys( $ns ) ),
                );
-               foreach( $ns as $n => $m ) {
+               foreach ( $ns as $n => $m ) {
                        $m = $this->msg( $m )->text();
                        $a['type']['options'][$m] = $n;
                }
index 774650b..fa62a99 100644 (file)
@@ -1087,7 +1087,7 @@ abstract class UploadBase {
                        // bytes. There shouldn't be a legitimate reason for this to happen.
                        wfDebug( __METHOD__ . ": Unmatched XML declaration start\n" );
                        return true;
-               } elseif ( substr( $contents, 0, 4) == "\x4C\x6F\xA7\x94" ) {
+               } elseif ( substr( $contents, 0, 4 ) == "\x4C\x6F\xA7\x94" ) {
                        // EBCDIC encoded XML
                        wfDebug( __METHOD__ . ": EBCDIC Encoded XML\n" );
                        return true;
index 6ffd72b..6846edf 100644 (file)
@@ -118,7 +118,7 @@ class CopyFileBackend extends Maintenance {
                                $this->statCache = array(); // clear
                                foreach ( $dstPathsRel as $dstPathRel ) {
                                        $path = $dst->getRootStoragePath() . "/$backendRel/$dstPathRel";
-                                       $this->statCache[sha1($path)] = $dst->getFileStat( array( 'src' => $path ) );
+                                       $this->statCache[sha1( $path )] = $dst->getFileStat( array( 'src' => $path ) );
                                }
                                $this->output( "done [" . count( $this->statCache ) . " file(s)]\n" );
                        }
index d3114c1..8053250 100644 (file)
@@ -93,12 +93,12 @@ class RebuildLocalisationCache extends Maintenance {
                $lc = new LocalisationCache_BulkLoad( $conf );
 
                $allCodes = array_keys( Language::fetchLanguageNames( null, 'mwfile' ) );
-               if( $this->hasOption( 'lang' ) ) {
+               if ( $this->hasOption( 'lang' ) ) {
                        # Validate requested languages
                        $codes = array_intersect( $allCodes,
                                explode( ',', $this->getOption( 'lang' ) ) );
                        # Bailed out if nothing is left
-                       if( count( $codes ) == 0 ) {
+                       if ( count( $codes ) == 0 ) {
                                $this->error( 'None of the languages specified exists.', 1 );
                        }
                } else {
index 489ff78..f18dfbf 100644 (file)
@@ -386,8 +386,9 @@ if ( isset( $_REQUEST['filter'] ) ) {
        }
 
        $s = new profile_point( 'SQL Queries', 0, $sqltotal, 0, 0 );
-       foreach ( $queries as $q )
+       foreach ( $queries as $q ) {
                $s->add_child( $q );
+       }
        $points[] = $s;
 
        usort( $points, 'compare_point' );
index 4a1b7ea..f65642b 100644 (file)
@@ -113,7 +113,7 @@ class TestORMRowTest extends ORMRowTest {
                        array(
                                array(
                                        'name' => 'Foobar',
-                                       'time' => $dbw->timestamp('20120101020202'),
+                                       'time' => $dbw->timestamp( '20120101020202' ),
                                        'age' => 42,
                                        'height' => 9000.1,
                                        'awesome' => true,