Umherirrender has uploaded a new change for review. https://gerrit.wikimedia.org/r/62994
Change subject: Fixed spacing ...................................................................... Fixed spacing Added spaces around some parenthesis Change-Id: If1e50e2a7b0046e91c0bbce8bf6641d8b2446a1d --- M includes/WebStart.php M includes/parser/CoreParserFunctions.php M includes/specials/SpecialActiveusers.php M includes/specials/SpecialRedirect.php M includes/upload/UploadBase.php M maintenance/copyFileBackend.php M maintenance/rebuildLocalisationCache.php M profileinfo.php M tests/phpunit/includes/db/TestORMRowTest.php 9 files changed, 15 insertions(+), 14 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/94/62994/1 diff --git a/includes/WebStart.php b/includes/WebStart.php index 81e7c13..ead6d77 100644 --- a/includes/WebStart.php +++ b/includes/WebStart.php @@ -146,7 +146,7 @@ # 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' ); diff --git a/includes/parser/CoreParserFunctions.php b/includes/parser/CoreParserFunctions.php index 493611a..be945f7 100644 --- a/includes/parser/CoreParserFunctions.php +++ b/includes/parser/CoreParserFunctions.php @@ -701,7 +701,7 @@ # 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 ); diff --git a/includes/specials/SpecialActiveusers.php b/includes/specials/SpecialActiveusers.php index a2978e3..63131c1 100644 --- a/includes/specials/SpecialActiveusers.php +++ b/includes/specials/SpecialActiveusers.php @@ -62,7 +62,7 @@ $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 @@ $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 @@ $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 @@ // 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 ''; } diff --git a/includes/specials/SpecialRedirect.php b/includes/specials/SpecialRedirect.php index 210cee6..2681207 100644 --- a/includes/specials/SpecialRedirect.php +++ b/includes/specials/SpecialRedirect.php @@ -145,7 +145,7 @@ */ 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 @@ '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; } diff --git a/includes/upload/UploadBase.php b/includes/upload/UploadBase.php index 774650b..fa62a99 100644 --- a/includes/upload/UploadBase.php +++ b/includes/upload/UploadBase.php @@ -1087,7 +1087,7 @@ // 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; diff --git a/maintenance/copyFileBackend.php b/maintenance/copyFileBackend.php index 6ffd72b..6846edf 100644 --- a/maintenance/copyFileBackend.php +++ b/maintenance/copyFileBackend.php @@ -118,7 +118,7 @@ $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" ); } diff --git a/maintenance/rebuildLocalisationCache.php b/maintenance/rebuildLocalisationCache.php index d3114c1..8053250 100644 --- a/maintenance/rebuildLocalisationCache.php +++ b/maintenance/rebuildLocalisationCache.php @@ -93,12 +93,12 @@ $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 { diff --git a/profileinfo.php b/profileinfo.php index 489ff78..f18dfbf 100644 --- a/profileinfo.php +++ b/profileinfo.php @@ -386,8 +386,9 @@ } $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' ); diff --git a/tests/phpunit/includes/db/TestORMRowTest.php b/tests/phpunit/includes/db/TestORMRowTest.php index 4a1b7ea..f65642b 100644 --- a/tests/phpunit/includes/db/TestORMRowTest.php +++ b/tests/phpunit/includes/db/TestORMRowTest.php @@ -113,7 +113,7 @@ array( array( 'name' => 'Foobar', - 'time' => $dbw->timestamp('20120101020202'), + 'time' => $dbw->timestamp( '20120101020202' ), 'age' => 42, 'height' => 9000.1, 'awesome' => true, -- To view, visit https://gerrit.wikimedia.org/r/62994 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: If1e50e2a7b0046e91c0bbce8bf6641d8b2446a1d Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Umherirrender <umherirrender_de...@web.de> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits