[MediaWiki-commits] [Gerrit] Fixed spacing - change (mediawiki/core)
jenkins-bot has submitted this change and it was merged. Change subject: Fixed spacing .. Fixed spacing - Removed space after cast - Removed spaces in array index - Removed double spaces - Added spaces around string concat - Fixed mixed tabs and spaces at begin of line Change-Id: I38e849723f055d2d4c05cba72f5c245a28e8d5da --- M includes/EditPage.php M includes/Html.php M includes/OutputPage.php M includes/db/DatabaseSqlite.php M includes/db/loadbalancer/LoadMonitorMySQL.php M includes/debug/logger/LegacyLogger.php M includes/htmlform/HTMLButtonField.php M includes/media/WebP.php M includes/parser/MWTidy.php M includes/registration/ExtensionRegistry.php M includes/resourceloader/ResourceLoader.php M includes/specials/SpecialChangeContentModel.php M includes/utils/BatchRowIterator.php M includes/utils/FileContentsHasher.php M tests/phpunit/includes/UserTest.php M tests/phpunit/includes/filebackend/SwiftFileBackendTest.php M tests/phpunit/includes/filerepo/MigrateFileRepoLayoutTest.php 17 files changed, 23 insertions(+), 23 deletions(-) Approvals: Reedy: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/EditPage.php b/includes/EditPage.php index 05e0ac0..89b484c 100644 --- a/includes/EditPage.php +++ b/includes/EditPage.php @@ -3705,7 +3705,7 @@ $imagesAvailable = $wgEnableUploads || count( $wgForeignFileRepos ); $showSignature = true; if ( $title ) { -$showSignature = MWNamespace::wantSignatures( $title->getNamespace() ); + $showSignature = MWNamespace::wantSignatures( $title->getNamespace() ); } /** diff --git a/includes/Html.php b/includes/Html.php index 62ae0b8..c61dca8 100644 --- a/includes/Html.php +++ b/includes/Html.php @@ -857,7 +857,7 @@ } elseif ( is_int( $nsId ) ) { $nsName = $wgContLang->convertNamespace( $nsId ); } - $optionsOut[ $nsId ] = $nsName; + $optionsOut[$nsId] = $nsName; } return $optionsOut; diff --git a/includes/OutputPage.php b/includes/OutputPage.php index 552e181..336e4f4 100644 --- a/includes/OutputPage.php +++ b/includes/OutputPage.php @@ -3973,7 +3973,7 @@ $themes = ExtensionRegistry::getInstance()->getAttribute( 'SkinOOUIThemes' ); // Make keys (skin names) lowercase for case-insensitive matching. $themes = array_change_key_case( $themes, CASE_LOWER ); - $theme = isset( $themes[ $skinName ] ) ? $themes[ $skinName ] : 'MediaWiki'; + $theme = isset( $themes[$skinName] ) ? $themes[$skinName] : 'MediaWiki'; // For example, 'OOUI\MediaWikiTheme'. $themeClass = "OOUI\\{$theme}Theme"; OOUI\Theme::setSingleton( new $themeClass() ); diff --git a/includes/db/DatabaseSqlite.php b/includes/db/DatabaseSqlite.php index 7ece56d..0a7629e 100644 --- a/includes/db/DatabaseSqlite.php +++ b/includes/db/DatabaseSqlite.php @@ -985,7 +985,7 @@ $indexInfo = $this->query( 'PRAGMA INDEX_INFO(' . $this->addQuotes( $index->name ) . ')' ); $fields = array(); foreach ( $indexInfo as $indexInfoRow ) { - $fields[ $indexInfoRow->seqno ] = $indexInfoRow->name; + $fields[$indexInfoRow->seqno] = $indexInfoRow->name; } $sql .= '(' . implode( ',', $fields ) . ')'; diff --git a/includes/db/loadbalancer/LoadMonitorMySQL.php b/includes/db/loadbalancer/LoadMonitorMySQL.php index 3008419..39ced1b 100644 --- a/includes/db/loadbalancer/LoadMonitorMySQL.php +++ b/includes/db/loadbalancer/LoadMonitorMySQL.php @@ -58,7 +58,7 @@ # (a) Check the local APC cache $value = $this->srvCache->get( $key ); if ( $value && $value['timestamp'] > ( microtime( true ) - $ttl ) ) { - wfDebugLog( 'replication', __FUNCTION__ . ": got lag times ($key) from local cache" ); + wfDebugLog( 'replication', __FUNCTION__ . ": got lag times ($key) from local cache" ); return $value['lagTimes']; // cache hit } $staleValue = $value ?: false; @@ -67,7 +67,7 @@ $value = $this->mainCache->get( $key ); if ( $value && $value['timestamp'] > ( microtime( true ) - $ttl ) ) { $this->srvCache->set( $key, $value, $staleTTL ); - wfDebugLog( 'replication', __FUNCTION__ . ": got lag times ($key) from main cache" ); + wfDebugLog( 'replication', __FUNCTION__ . ": got lag times ($key) from main cache" );
[MediaWiki-commits] [Gerrit] Fixed spacing - change (mediawiki/core)
Umherirrender has uploaded a new change for review. https://gerrit.wikimedia.org/r/241463 Change subject: Fixed spacing .. Fixed spacing - Removed space after cast - Removed spaces in array index - Removed double spaces - Added spaces around string concat - Fixed mixed tabs and spaces at begin of line Change-Id: I38e849723f055d2d4c05cba72f5c245a28e8d5da --- M includes/EditPage.php M includes/Html.php M includes/OutputPage.php M includes/db/DatabaseSqlite.php M includes/db/loadbalancer/LoadMonitorMySQL.php M includes/debug/logger/LegacyLogger.php M includes/htmlform/HTMLButtonField.php M includes/media/WebP.php M includes/parser/MWTidy.php M includes/registration/ExtensionRegistry.php M includes/resourceloader/ResourceLoader.php M includes/specials/SpecialChangeContentModel.php M includes/utils/BatchRowIterator.php M includes/utils/FileContentsHasher.php M tests/phpunit/includes/UserTest.php M tests/phpunit/includes/filebackend/SwiftFileBackendTest.php M tests/phpunit/includes/filerepo/MigrateFileRepoLayoutTest.php 17 files changed, 23 insertions(+), 23 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/63/241463/1 diff --git a/includes/EditPage.php b/includes/EditPage.php index 05e0ac0..89b484c 100644 --- a/includes/EditPage.php +++ b/includes/EditPage.php @@ -3705,7 +3705,7 @@ $imagesAvailable = $wgEnableUploads || count( $wgForeignFileRepos ); $showSignature = true; if ( $title ) { -$showSignature = MWNamespace::wantSignatures( $title->getNamespace() ); + $showSignature = MWNamespace::wantSignatures( $title->getNamespace() ); } /** diff --git a/includes/Html.php b/includes/Html.php index 62ae0b8..c61dca8 100644 --- a/includes/Html.php +++ b/includes/Html.php @@ -857,7 +857,7 @@ } elseif ( is_int( $nsId ) ) { $nsName = $wgContLang->convertNamespace( $nsId ); } - $optionsOut[ $nsId ] = $nsName; + $optionsOut[$nsId] = $nsName; } return $optionsOut; diff --git a/includes/OutputPage.php b/includes/OutputPage.php index 552e181..336e4f4 100644 --- a/includes/OutputPage.php +++ b/includes/OutputPage.php @@ -3973,7 +3973,7 @@ $themes = ExtensionRegistry::getInstance()->getAttribute( 'SkinOOUIThemes' ); // Make keys (skin names) lowercase for case-insensitive matching. $themes = array_change_key_case( $themes, CASE_LOWER ); - $theme = isset( $themes[ $skinName ] ) ? $themes[ $skinName ] : 'MediaWiki'; + $theme = isset( $themes[$skinName] ) ? $themes[$skinName] : 'MediaWiki'; // For example, 'OOUI\MediaWikiTheme'. $themeClass = "OOUI\\{$theme}Theme"; OOUI\Theme::setSingleton( new $themeClass() ); diff --git a/includes/db/DatabaseSqlite.php b/includes/db/DatabaseSqlite.php index 7ece56d..0a7629e 100644 --- a/includes/db/DatabaseSqlite.php +++ b/includes/db/DatabaseSqlite.php @@ -985,7 +985,7 @@ $indexInfo = $this->query( 'PRAGMA INDEX_INFO(' . $this->addQuotes( $index->name ) . ')' ); $fields = array(); foreach ( $indexInfo as $indexInfoRow ) { - $fields[ $indexInfoRow->seqno ] = $indexInfoRow->name; + $fields[$indexInfoRow->seqno] = $indexInfoRow->name; } $sql .= '(' . implode( ',', $fields ) . ')'; diff --git a/includes/db/loadbalancer/LoadMonitorMySQL.php b/includes/db/loadbalancer/LoadMonitorMySQL.php index 3008419..39ced1b 100644 --- a/includes/db/loadbalancer/LoadMonitorMySQL.php +++ b/includes/db/loadbalancer/LoadMonitorMySQL.php @@ -58,7 +58,7 @@ # (a) Check the local APC cache $value = $this->srvCache->get( $key ); if ( $value && $value['timestamp'] > ( microtime( true ) - $ttl ) ) { - wfDebugLog( 'replication', __FUNCTION__ . ": got lag times ($key) from local cache" ); + wfDebugLog( 'replication', __FUNCTION__ . ": got lag times ($key) from local cache" ); return $value['lagTimes']; // cache hit } $staleValue = $value ?: false; @@ -67,7 +67,7 @@ $value = $this->mainCache->get( $key ); if ( $value && $value['timestamp'] > ( microtime( true ) - $ttl ) ) { $this->srvCache->set( $key, $value, $staleTTL ); - wfDebugLog( 'replication', __FUNCTION__ . ": got lag times ($key) from main cache" ); + wfDebugLog( 'replication', __FUNCTION__ . ": got lag times
[MediaWiki-commits] [Gerrit] Fixed spacing - change (mediawiki/core)
Umherirrender has uploaded a new change for review. https://gerrit.wikimedia.org/r/219010 Change subject: Fixed spacing .. Fixed spacing - Removed space after casts - Removed spaces in array index - Added spaces around string concat - Added space after words: switch, foreach - else if - elseif - Removed parentheses around require_once, because it is not a function - Added newline at end of file - Removed double spaces - Added spaces around operations - Removed repeated newlines Change-Id: Ib860222b24f8ad8e9062cd4dc42ec88dc63fb49e --- M includes/Import.php M includes/Setup.php M includes/api/ApiFormatXml.php M includes/api/ApiParamInfo.php M includes/cache/LCStoreStaticArray.php M includes/objectcache/SqlBagOStuff.php M includes/registration/ExtensionRegistry.php M includes/resourceloader/ResourceLoader.php M includes/resourceloader/ResourceLoaderImage.php M includes/resourceloader/ResourceLoaderImageModule.php M includes/resourceloader/ResourceLoaderModule.php M includes/resourceloader/ResourceLoaderOOUIImageModule.php M includes/resourceloader/ResourceLoaderSkinModule.php M includes/resourceloader/ResourceLoaderStartUpModule.php M includes/skins/Skin.php M includes/skins/SkinFallbackTemplate.php M includes/upload/UploadFromUrl.php M languages/messages/MessagesGom.php M languages/messages/MessagesGom_deva.php M languages/messages/MessagesPnt.php M maintenance/exportSites.php M maintenance/importSites.php M resources/ResourcesOOUI.php M tests/phpunit/ResourceLoaderTestCase.php M tests/phpunit/includes/api/ApiMainTest.php M tests/phpunit/includes/api/ApiResultTest.php M tests/phpunit/includes/api/query/ApiQueryTest.php M tests/phpunit/includes/objectcache/WANObjectCacheTest.php M tests/phpunit/includes/site/HashSiteStoreTest.php M tests/phpunit/includes/site/SiteExporterTest.php M tests/phpunit/includes/utils/IPTest.php M tests/phpunit/structure/AvailableRightsTest.php 32 files changed, 76 insertions(+), 80 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/10/219010/1 diff --git a/includes/Import.php b/includes/Import.php index 214bc4e..6a0bfd0 100644 --- a/includes/Import.php +++ b/includes/Import.php @@ -394,9 +394,9 @@ $countKey = 'title_' . $title-getPrefixedText(); $countable = $page-isCountable( $editInfo ); if ( array_key_exists( $countKey, $this-countableCache ) - $countable != $this-countableCache[ $countKey ] ) { + $countable != $this-countableCache[$countKey] ) { DeferredUpdates::addUpdate( SiteStatsUpdate::factory( array( - 'articles' = ( (int)$countable - (int)$this-countableCache[ $countKey ] ) + 'articles' = ( (int)$countable - (int)$this-countableCache[$countKey] ) ) ) ); } } @@ -611,7 +611,7 @@ $tag = $this-reader-localName; if ( $tag == 'namespace' ) { - $this-foreignNamespaces[ $this-nodeAttribute( 'key' ) ] = + $this-foreignNamespaces[$this-nodeAttribute( 'key' )] = $this-nodeContents(); } elseif ( in_array( $tag, $normalFields ) ) { $siteInfo[$tag] = $this-nodeContents(); diff --git a/includes/Setup.php b/includes/Setup.php index 2fa9de1..a97cfa6 100644 --- a/includes/Setup.php +++ b/includes/Setup.php @@ -363,7 +363,7 @@ // Default value is 2000 or the suhosin limit if it is between 1 and 2000 if ( $wgResourceLoaderMaxQueryLength === false ) { - $suhosinMaxValueLength = (int) ini_get( 'suhosin.get.max_value_length' ); + $suhosinMaxValueLength = (int)ini_get( 'suhosin.get.max_value_length' ); if ( $suhosinMaxValueLength 0 $suhosinMaxValueLength 2000 ) { $wgResourceLoaderMaxQueryLength = $suhosinMaxValueLength; } else { diff --git a/includes/api/ApiFormatXml.php b/includes/api/ApiFormatXml.php index fa0bac3..4c7d720 100644 --- a/includes/api/ApiFormatXml.php +++ b/includes/api/ApiFormatXml.php @@ -72,7 +72,7 @@ 'Custom' = function ( $data, $metadata ) { if ( isset( $metadata[ApiResult::META_TYPE] ) ) { // We want to use non-BC for BCassoc to force outputting of _idx. - switch( $metadata[ApiResult::META_TYPE] ) { + switch ( $metadata[ApiResult::META_TYPE] ) { case 'BCassoc': $metadata[ApiResult::META_TYPE] = 'assoc';
[MediaWiki-commits] [Gerrit] Fixed spacing - change (mediawiki/core)
jenkins-bot has submitted this change and it was merged. Change subject: Fixed spacing .. Fixed spacing - Removed space after casts - Removed spaces in array index - Added spaces around string concat - Added space after words: switch, foreach - else if - elseif - Removed parentheses around require_once, because it is not a function - Added newline at end of file - Removed double spaces - Added spaces around operations - Removed repeated newlines Bug: T102609 Change-Id: Ib860222b24f8ad8e9062cd4dc42ec88dc63fb49e --- M includes/Import.php M includes/Setup.php M includes/api/ApiFormatXml.php M includes/api/ApiParamInfo.php M includes/cache/LCStoreStaticArray.php M includes/objectcache/SqlBagOStuff.php M includes/registration/ExtensionRegistry.php M includes/resourceloader/ResourceLoader.php M includes/resourceloader/ResourceLoaderImage.php M includes/resourceloader/ResourceLoaderImageModule.php M includes/resourceloader/ResourceLoaderModule.php M includes/resourceloader/ResourceLoaderOOUIImageModule.php M includes/resourceloader/ResourceLoaderSkinModule.php M includes/resourceloader/ResourceLoaderStartUpModule.php M includes/skins/Skin.php M includes/skins/SkinFallbackTemplate.php M includes/upload/UploadFromUrl.php M languages/messages/MessagesGom.php M languages/messages/MessagesGom_deva.php M languages/messages/MessagesPnt.php M maintenance/exportSites.php M maintenance/importSites.php M resources/ResourcesOOUI.php M tests/phpunit/ResourceLoaderTestCase.php M tests/phpunit/includes/api/ApiMainTest.php M tests/phpunit/includes/api/ApiResultTest.php M tests/phpunit/includes/api/query/ApiQueryTest.php M tests/phpunit/includes/objectcache/WANObjectCacheTest.php M tests/phpunit/includes/site/HashSiteStoreTest.php M tests/phpunit/includes/site/SiteExporterTest.php M tests/phpunit/includes/utils/IPTest.php M tests/phpunit/structure/AvailableRightsTest.php 32 files changed, 76 insertions(+), 80 deletions(-) Approvals: Paladox: Looks good to me, but someone else must approve Polybuildr: Looks good to me, but someone else must approve Bartosz Dziewoński: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/Import.php b/includes/Import.php index 214bc4e..6a0bfd0 100644 --- a/includes/Import.php +++ b/includes/Import.php @@ -394,9 +394,9 @@ $countKey = 'title_' . $title-getPrefixedText(); $countable = $page-isCountable( $editInfo ); if ( array_key_exists( $countKey, $this-countableCache ) - $countable != $this-countableCache[ $countKey ] ) { + $countable != $this-countableCache[$countKey] ) { DeferredUpdates::addUpdate( SiteStatsUpdate::factory( array( - 'articles' = ( (int)$countable - (int)$this-countableCache[ $countKey ] ) + 'articles' = ( (int)$countable - (int)$this-countableCache[$countKey] ) ) ) ); } } @@ -611,7 +611,7 @@ $tag = $this-reader-localName; if ( $tag == 'namespace' ) { - $this-foreignNamespaces[ $this-nodeAttribute( 'key' ) ] = + $this-foreignNamespaces[$this-nodeAttribute( 'key' )] = $this-nodeContents(); } elseif ( in_array( $tag, $normalFields ) ) { $siteInfo[$tag] = $this-nodeContents(); diff --git a/includes/Setup.php b/includes/Setup.php index 2fa9de1..a97cfa6 100644 --- a/includes/Setup.php +++ b/includes/Setup.php @@ -363,7 +363,7 @@ // Default value is 2000 or the suhosin limit if it is between 1 and 2000 if ( $wgResourceLoaderMaxQueryLength === false ) { - $suhosinMaxValueLength = (int) ini_get( 'suhosin.get.max_value_length' ); + $suhosinMaxValueLength = (int)ini_get( 'suhosin.get.max_value_length' ); if ( $suhosinMaxValueLength 0 $suhosinMaxValueLength 2000 ) { $wgResourceLoaderMaxQueryLength = $suhosinMaxValueLength; } else { diff --git a/includes/api/ApiFormatXml.php b/includes/api/ApiFormatXml.php index fa0bac3..4c7d720 100644 --- a/includes/api/ApiFormatXml.php +++ b/includes/api/ApiFormatXml.php @@ -72,7 +72,7 @@ 'Custom' = function ( $data, $metadata ) { if ( isset( $metadata[ApiResult::META_TYPE] ) ) { // We want to use non-BC for BCassoc to force outputting of _idx. - switch( $metadata[ApiResult::META_TYPE] ) { + switch ( $metadata[ApiResult::META_TYPE] ) { case 'BCassoc':
[MediaWiki-commits] [Gerrit] Fixed spacing - change (mediawiki/core)
jenkins-bot has submitted this change and it was merged. Change subject: Fixed spacing .. Fixed spacing - Added/removed spaces around parenthesis - Added newline in empty blocks - Added space after switch/foreach/function - Use tabs at begin of line - Add newline at end of file Change-Id: I244cdb2c333489e1020931bf4ac5266a87439f0d --- M includes/CdbCompat.php M includes/PrefixSearch.php M includes/Status.php M includes/api/ApiOpenSearch.php M includes/api/ApiQuerySearch.php M includes/cache/LocalisationCache.php M includes/db/Database.php M includes/db/LBFactory.php M includes/filebackend/FSFileBackend.php M includes/installer/DatabaseUpdater.php M includes/installer/WebInstallerOutput.php M includes/media/Bitmap.php M includes/parser/MWTidy.php M includes/parser/Parser.php M includes/profiler/ProfilerStandard.php M includes/profiler/ProfilerStub.php M includes/profiler/ProfilerXhprof.php M includes/profiler/SectionProfiler.php M includes/profiler/output/ProfilerOutputDb.php M includes/profiler/output/ProfilerOutputText.php M includes/profiler/output/ProfilerOutputUdp.php M includes/site/SiteListFileCache.php M includes/site/SiteListFileCacheBuilder.php M includes/utils/AutoloadGenerator.php M maintenance/backupTextPass.inc M tests/phpunit/includes/PrefixSearchTest.php M tests/phpunit/includes/db/DatabaseSqliteTest.php M tests/phpunit/includes/media/FormatMetadataTest.php M tests/phpunit/maintenance/backupTextPassTest.php 29 files changed, 61 insertions(+), 57 deletions(-) Approvals: Aaron Schulz: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/CdbCompat.php b/includes/CdbCompat.php index 0c00b39..0074cc9 100644 --- a/includes/CdbCompat.php +++ b/includes/CdbCompat.php @@ -29,14 +29,17 @@ /** * @deprecated since 1.25 */ -abstract class CdbReader extends \Cdb\Reader {} +abstract class CdbReader extends \Cdb\Reader { +} /** * @deprecated since 1.25 */ -abstract class CdbWriter extends \Cdb\Writer {} +abstract class CdbWriter extends \Cdb\Writer { +} /** * @deprecated since 1.25 */ -class CdbException extends \Cdb\Exception {} +class CdbException extends \Cdb\Exception { +} diff --git a/includes/PrefixSearch.php b/includes/PrefixSearch.php index a4e64ee..4df6a9e 100644 --- a/includes/PrefixSearch.php +++ b/includes/PrefixSearch.php @@ -199,19 +199,19 @@ return $this-pullFront( $key, $srchres ); } $redirectTargetsToRedirect = $this-redirectTargetsToRedirect( $srchres ); - if ( isset( $redirectTargetsToRedirect[ $target ] ) ) { + if ( isset( $redirectTargetsToRedirect[$target] ) ) { // The exact match and something in the results list are both redirects // to the same thing! In this case we'll pull the returned match to the // top following the same logic above. Again, it might not be a perfect // choice but it'll do. - return $this-pullFront( $redirectTargetsToRedirect[ $target ], $srchres ); + return $this-pullFront( $redirectTargetsToRedirect[$target], $srchres ); } } else { $redirectTargetsToRedirect = $this-redirectTargetsToRedirect( $srchres ); - if ( isset( $redirectTargetsToRedirect[ $string ] ) ) { + if ( isset( $redirectTargetsToRedirect[$string] ) ) { // The exact match is the target of a redirect already in the results list so remove // the redirect from the results list and push the exact match to the front - array_splice( $srchres, $redirectTargetsToRedirect[ $string ], 1 ); + array_splice( $srchres, $redirectTargetsToRedirect[$string], 1 ); array_unshift( $srchres, $string ); return $srchres; } @@ -242,7 +242,7 @@ if ( !$target ) { continue; } - $result[ $target ] = $key; + $result[$target] = $key; } return $result; } diff --git a/includes/Status.php b/includes/Status.php index 265eae1..fb267bd 100644 --- a/includes/Status.php +++ b/includes/Status.php @@ -469,7 +469,7 @@ public function __toString() { $status = $this-isOK() ? OK : Error; if ( count( $this-errors ) ) { - $errorcount = collected . ( count($this-errors) ) . error(s) on the way; + $errorcount = collected . ( count( $this-errors ) )
[MediaWiki-commits] [Gerrit] Fixed spacing - change (mediawiki/core)
Umherirrender has uploaded a new change for review. https://gerrit.wikimedia.org/r/176292 Change subject: Fixed spacing .. Fixed spacing - Added/removed spaces around parenthesis - Added newline in empty blocks - Added space after switch/foreach/function - Use tabs at begin of line - Add newline at end of file Change-Id: I244cdb2c333489e1020931bf4ac5266a87439f0d --- M includes/CdbCompat.php M includes/Status.php M includes/api/ApiOpenSearch.php M includes/cache/LocalisationCache.php M includes/db/Database.php M includes/filebackend/FSFileBackend.php M includes/media/Bitmap.php M includes/parser/Parser.php M includes/profiler/ProfilerStandard.php M includes/profiler/ProfilerXhprof.php M includes/profiler/SectionProfiler.php M includes/profiler/output/ProfilerOutputText.php M includes/utils/AutoloadGenerator.php M maintenance/backupTextPass.inc M tests/phpunit/includes/media/FormatMetadataTest.php M tests/phpunit/maintenance/backupTextPassTest.php 16 files changed, 36 insertions(+), 32 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/92/176292/1 diff --git a/includes/CdbCompat.php b/includes/CdbCompat.php index 0c00b39..0074cc9 100644 --- a/includes/CdbCompat.php +++ b/includes/CdbCompat.php @@ -29,14 +29,17 @@ /** * @deprecated since 1.25 */ -abstract class CdbReader extends \Cdb\Reader {} +abstract class CdbReader extends \Cdb\Reader { +} /** * @deprecated since 1.25 */ -abstract class CdbWriter extends \Cdb\Writer {} +abstract class CdbWriter extends \Cdb\Writer { +} /** * @deprecated since 1.25 */ -class CdbException extends \Cdb\Exception {} +class CdbException extends \Cdb\Exception { +} diff --git a/includes/Status.php b/includes/Status.php index 265eae1..fb267bd 100644 --- a/includes/Status.php +++ b/includes/Status.php @@ -469,7 +469,7 @@ public function __toString() { $status = $this-isOK() ? OK : Error; if ( count( $this-errors ) ) { - $errorcount = collected . ( count($this-errors) ) . error(s) on the way; + $errorcount = collected . ( count( $this-errors ) ) . error(s) on the way; } else { $errorcount = no errors detected; } @@ -486,16 +486,16 @@ $errorcount, $valstr ); - if ( count ($this-errors ) 0 ) { + if ( count( $this-errors ) 0 ) { $hdr = sprintf( +-%'-4s-+-%'-25s-+-%'-40s-+\n, , , ); $i = 1; $out .= \n; $out .= $hdr; - foreach( $this-getStatusArray() as $stat ) { + foreach ( $this-getStatusArray() as $stat ) { $out .= sprintf( | %4d | %-25.25s | %-40.40s |\n, $i, $stat[0], - implode( , array_slice( $stat, 1 ) ) + implode( , array_slice( $stat, 1 ) ) ); $i += 1; } diff --git a/includes/api/ApiOpenSearch.php b/includes/api/ApiOpenSearch.php index 4a9e216..2235ba9 100644 --- a/includes/api/ApiOpenSearch.php +++ b/includes/api/ApiOpenSearch.php @@ -59,7 +59,7 @@ } public function getCustomPrinter() { - switch( $this-getFormat() ) { + switch ( $this-getFormat() ) { case 'json': return $this-getMain()-createPrinterByName( 'json' . $this-fm ); diff --git a/includes/cache/LocalisationCache.php b/includes/cache/LocalisationCache.php index 2a3cd38..4dbe26e 100644 --- a/includes/cache/LocalisationCache.php +++ b/includes/cache/LocalisationCache.php @@ -23,6 +23,7 @@ use Cdb\Exception as CdbException; use Cdb\Reader as CdbReader; use Cdb\Writer as CdbWriter; + /** * Class for caching the contents of localisation files, Messages*.php * and *.i18n.php. diff --git a/includes/db/Database.php b/includes/db/Database.php index fc13eeb..cbfad07 100644 --- a/includes/db/Database.php +++ b/includes/db/Database.php @@ -1003,7 +1003,7 @@ if ( $queryProf != '' ) { $queryStartTime = microtime( true ); $queryProfile = new ScopedCallback( - function() use ( $queryStartTime, $queryProf, $isMaster ) { + function () use ( $queryStartTime, $queryProf, $isMaster ) { $trxProfiler = Profiler::instance()-getTransactionProfiler(); $trxProfiler-recordQueryCompletion( $queryProf, $queryStartTime, $isMaster );
[MediaWiki-commits] [Gerrit] Fixed spacing - change (mediawiki/core)
Umherirrender has uploaded a new change for review. https://gerrit.wikimedia.org/r/170078 Change subject: Fixed spacing .. Fixed spacing - Changed spaces to tabs for indentation - space after 'function'/'if' - Added/Removed space after parenthesis/brackets/end of line - Removed space after cast Change-Id: I0e8e6a19b84b5e1308b632a0266cb78f688494ee --- M includes/GlobalFunctions.php M includes/api/ApiFormatBase.php M includes/api/ApiMain.php M includes/db/ORMTable.php M includes/debug/logger/legacy/Logger.php M includes/debug/logger/legacy/Spi.php M includes/debug/logger/monolog/Handler.php M includes/resourceloader/ResourceLoaderFileModule.php M includes/specials/SpecialImport.php M includes/specials/SpecialNewpages.php M tests/phpunit/includes/TestUser.php 11 files changed, 14 insertions(+), 14 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/78/170078/1 diff --git a/includes/GlobalFunctions.php b/includes/GlobalFunctions.php index cc7086c..261cb92 100644 --- a/includes/GlobalFunctions.php +++ b/includes/GlobalFunctions.php @@ -3709,7 +3709,7 @@ // Figure out which clusters need to be checked $lbs = array(); if ( $cluster === '*' ) { - wfGetLBFactory()-forEachLB( function( LoadBalancer $lb ) use ( $lbs ) { + wfGetLBFactory()-forEachLB( function ( LoadBalancer $lb ) use ( $lbs ) { $lbs[] = $lb; } ); } elseif ( $cluster !== false ) { diff --git a/includes/api/ApiFormatBase.php b/includes/api/ApiFormatBase.php index 230a340..913b8eb 100644 --- a/includes/api/ApiFormatBase.php +++ b/includes/api/ApiFormatBase.php @@ -164,8 +164,8 @@ $out-setPageTitle( $context-msg( 'api-format-title' ) ); $header = $context-msg( 'api-format-prettyprint-header' ) - -params( $format, strtolower( $format ) ) - -parseAsBlock(); + -params( $format, strtolower( $format ) ) + -parseAsBlock(); $out-addHTML( Html::rawElement( 'div', array( 'class' = 'api-pretty-header' ), ApiHelp::fixHelpLinks( $header ) diff --git a/includes/api/ApiMain.php b/includes/api/ApiMain.php index 472f753..f7588a3 100644 --- a/includes/api/ApiMain.php +++ b/includes/api/ApiMain.php @@ -310,7 +310,7 @@ // then there's an appropriate Vary header set by whatever set // their non-default language. wfDebug( __METHOD__ . : downgrading cache mode 'public' to . - 'anon-public-user-private' due to uselang=user\n ); + 'anon-public-user-private' due to uselang=user\n ); $mode = 'anon-public-user-private'; } diff --git a/includes/db/ORMTable.php b/includes/db/ORMTable.php index 1868073..b22df39 100644 --- a/includes/db/ORMTable.php +++ b/includes/db/ORMTable.php @@ -800,7 +800,7 @@ private function stripFieldPrefix( array $fieldNames ) { $start = strlen( $this-fieldPrefix ); - return array_map( function( $fieldName ) use ( $start ) { + return array_map( function ( $fieldName ) use ( $start ) { return substr( $fieldName, $start ); }, $fieldNames ); } diff --git a/includes/debug/logger/legacy/Logger.php b/includes/debug/logger/legacy/Logger.php index ff6336b..a19bcc9 100644 --- a/includes/debug/logger/legacy/Logger.php +++ b/includes/debug/logger/legacy/Logger.php @@ -83,7 +83,7 @@ if ( $channel === 'wfLogDBError' ) { // wfLogDBError messages are emitted if a database log location is // specfied. - $shouldEmit = (bool) $wgDBerrorLog; + $shouldEmit = (bool)$wgDBerrorLog; } elseif ( $channel === 'wfErrorLog' ) { // All messages on the wfErrorLog channel should be emitted. diff --git a/includes/debug/logger/legacy/Spi.php b/includes/debug/logger/legacy/Spi.php index 51e14a2..a3d34fa 100644 --- a/includes/debug/logger/legacy/Spi.php +++ b/includes/debug/logger/legacy/Spi.php @@ -50,7 +50,7 @@ */ public function getLogger( $channel ) { if ( !isset( $this-singletons[$channel] ) ) { - $this-singletons[$channel] = new MWLoggerLegacyLogger($channel); + $this-singletons[$channel] = new MWLoggerLegacyLogger( $channel ); } return $this-singletons[$channel]; } diff --git a/includes/debug/logger/monolog/Handler.php b/includes/debug/logger/monolog/Handler.php index 1472459..02ab309
[MediaWiki-commits] [Gerrit] Fixed spacing - change (mediawiki/core)
jenkins-bot has submitted this change and it was merged. Change subject: Fixed spacing .. Fixed spacing - Changed spaces to tabs for indentation - space after 'function'/'if' - Added/Removed space after parenthesis/brackets/end of line - Removed space after cast Change-Id: I0e8e6a19b84b5e1308b632a0266cb78f688494ee --- M includes/GlobalFunctions.php M includes/api/ApiFormatBase.php M includes/api/ApiMain.php M includes/db/ORMTable.php M includes/debug/logger/legacy/Logger.php M includes/debug/logger/legacy/Spi.php M includes/debug/logger/monolog/Handler.php M includes/resourceloader/ResourceLoaderFileModule.php M includes/specials/SpecialImport.php M includes/specials/SpecialNewpages.php M tests/phpunit/includes/TestUser.php 11 files changed, 14 insertions(+), 14 deletions(-) Approvals: Aaron Schulz: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/GlobalFunctions.php b/includes/GlobalFunctions.php index cc7086c..261cb92 100644 --- a/includes/GlobalFunctions.php +++ b/includes/GlobalFunctions.php @@ -3709,7 +3709,7 @@ // Figure out which clusters need to be checked $lbs = array(); if ( $cluster === '*' ) { - wfGetLBFactory()-forEachLB( function( LoadBalancer $lb ) use ( $lbs ) { + wfGetLBFactory()-forEachLB( function ( LoadBalancer $lb ) use ( $lbs ) { $lbs[] = $lb; } ); } elseif ( $cluster !== false ) { diff --git a/includes/api/ApiFormatBase.php b/includes/api/ApiFormatBase.php index 230a340..913b8eb 100644 --- a/includes/api/ApiFormatBase.php +++ b/includes/api/ApiFormatBase.php @@ -164,8 +164,8 @@ $out-setPageTitle( $context-msg( 'api-format-title' ) ); $header = $context-msg( 'api-format-prettyprint-header' ) - -params( $format, strtolower( $format ) ) - -parseAsBlock(); + -params( $format, strtolower( $format ) ) + -parseAsBlock(); $out-addHTML( Html::rawElement( 'div', array( 'class' = 'api-pretty-header' ), ApiHelp::fixHelpLinks( $header ) diff --git a/includes/api/ApiMain.php b/includes/api/ApiMain.php index 472f753..f7588a3 100644 --- a/includes/api/ApiMain.php +++ b/includes/api/ApiMain.php @@ -310,7 +310,7 @@ // then there's an appropriate Vary header set by whatever set // their non-default language. wfDebug( __METHOD__ . : downgrading cache mode 'public' to . - 'anon-public-user-private' due to uselang=user\n ); + 'anon-public-user-private' due to uselang=user\n ); $mode = 'anon-public-user-private'; } diff --git a/includes/db/ORMTable.php b/includes/db/ORMTable.php index 1868073..b22df39 100644 --- a/includes/db/ORMTable.php +++ b/includes/db/ORMTable.php @@ -800,7 +800,7 @@ private function stripFieldPrefix( array $fieldNames ) { $start = strlen( $this-fieldPrefix ); - return array_map( function( $fieldName ) use ( $start ) { + return array_map( function ( $fieldName ) use ( $start ) { return substr( $fieldName, $start ); }, $fieldNames ); } diff --git a/includes/debug/logger/legacy/Logger.php b/includes/debug/logger/legacy/Logger.php index ff6336b..a19bcc9 100644 --- a/includes/debug/logger/legacy/Logger.php +++ b/includes/debug/logger/legacy/Logger.php @@ -83,7 +83,7 @@ if ( $channel === 'wfLogDBError' ) { // wfLogDBError messages are emitted if a database log location is // specfied. - $shouldEmit = (bool) $wgDBerrorLog; + $shouldEmit = (bool)$wgDBerrorLog; } elseif ( $channel === 'wfErrorLog' ) { // All messages on the wfErrorLog channel should be emitted. diff --git a/includes/debug/logger/legacy/Spi.php b/includes/debug/logger/legacy/Spi.php index 51e14a2..a3d34fa 100644 --- a/includes/debug/logger/legacy/Spi.php +++ b/includes/debug/logger/legacy/Spi.php @@ -50,7 +50,7 @@ */ public function getLogger( $channel ) { if ( !isset( $this-singletons[$channel] ) ) { - $this-singletons[$channel] = new MWLoggerLegacyLogger($channel); + $this-singletons[$channel] = new MWLoggerLegacyLogger( $channel ); } return $this-singletons[$channel]; } diff --git a/includes/debug/logger/monolog/Handler.php b/includes/debug/logger/monolog/Handler.php index 1472459..02ab309 100644 ---
[MediaWiki-commits] [Gerrit] Fixed spacing - change (mediawiki/core)
Umherirrender has uploaded a new change for review. https://gerrit.wikimedia.org/r/163639 Change subject: Fixed spacing .. Fixed spacing - Added newline at end of file - Removed double spaces/newlines - Added space after if/function and parentheses/brackets - Removed space before comma/cast - Fixed indent of some lines Change-Id: I29867ffdffdfb7d2b56997e9393497c7dc12f7d3 --- M includes/MovePage.php M includes/OutputPage.php M includes/PrefixSearch.php M includes/cache/bloom/BloomCache.php M includes/db/DatabaseMssql.php M includes/filerepo/file/File.php M includes/mail/MailAddress.php M includes/pager/IndexPager.php M includes/resourceloader/ResourceLoaderWikiModule.php M includes/site/SiteSQLStore.php M includes/specials/SpecialCategories.php M includes/specials/SpecialWantedfiles.php M includes/upload/UploadBase.php M tests/phpunit/includes/changes/EnhancedChangesListTest.php M tests/phpunit/includes/config/HashConfigTest.php M tests/phpunit/includes/mail/MailAddressTest.php M tests/phpunit/includes/specialpage/SpecialPageFactoryTest.php 17 files changed, 21 insertions(+), 25 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/39/163639/1 diff --git a/includes/MovePage.php b/includes/MovePage.php index cea91d2..5c9490b 100644 --- a/includes/MovePage.php +++ b/includes/MovePage.php @@ -423,5 +423,4 @@ $logid = $logEntry-insert(); $logEntry-publish( $logid ); } - -} \ No newline at end of file +} diff --git a/includes/OutputPage.php b/includes/OutputPage.php index 3321747..e1b6e0e 100644 --- a/includes/OutputPage.php +++ b/includes/OutputPage.php @@ -2769,7 +2769,6 @@ ); $context = new ResourceLoaderContext( $resourceLoader, new FauxRequest( $query ) ); - // Extract modules that know they're empty and see if we have one or more // raw modules $isRaw = false; diff --git a/includes/PrefixSearch.php b/includes/PrefixSearch.php index 718750f..1f684fb 100644 --- a/includes/PrefixSearch.php +++ b/includes/PrefixSearch.php @@ -195,7 +195,7 @@ // Unlike SpecialPage itself, we want the canonical forms of both // canonical and alias title forms... $keys = array(); - foreach ( SpecialPageFactory::getNames() as $page ) { + foreach ( SpecialPageFactory::getNames() as $page ) { $keys[$wgContLang-caseFold( $page )] = $page; } diff --git a/includes/cache/bloom/BloomCache.php b/includes/cache/bloom/BloomCache.php index 236db95..a15b461 100644 --- a/includes/cache/bloom/BloomCache.php +++ b/includes/cache/bloom/BloomCache.php @@ -318,6 +318,6 @@ } protected function doGetStatus( $virtualKey ) { - return array( 'lastID' = null, 'asOfTime' = null, 'epoch' = null ) ; + return array( 'lastID' = null, 'asOfTime' = null, 'epoch' = null ); } } diff --git a/includes/db/DatabaseMssql.php b/includes/db/DatabaseMssql.php index af3cc72..ab8d366 100644 --- a/includes/db/DatabaseMssql.php +++ b/includes/db/DatabaseMssql.php @@ -692,7 +692,7 @@ if ( !is_null( $identity ) ) { // then we want to get the identity column value we were assigned and save it off $row = $ret-fetchObject(); - if( is_object( $row ) ){ + if ( is_object( $row ) ) { $this-mInsertId = $row-$identity; } } diff --git a/includes/filerepo/file/File.php b/includes/filerepo/file/File.php index b574c5e..7563d64 100644 --- a/includes/filerepo/file/File.php +++ b/includes/filerepo/file/File.php @@ -1237,7 +1237,7 @@ $that = $this; $work = new PoolCounterWorkViaCallback( 'GetLocalFileCopy', sha1( $this-getName() ), array( - 'doWork' = function() use ( $that ) { + 'doWork' = function () use ( $that ) { return $that-getLocalRefPath(); } ) diff --git a/includes/mail/MailAddress.php b/includes/mail/MailAddress.php index 6817908..7a228bd 100644 --- a/includes/mail/MailAddress.php +++ b/includes/mail/MailAddress.php @@ -38,7 +38,7 @@ function __construct( $address, $name = null, $realName = null ) { if ( is_object( $address ) $address instanceof User ) { // Old calling format, now deprecated - wfDeprecated( __METHOD__
[MediaWiki-commits] [Gerrit] Fixed spacing - change (mediawiki/core)
jenkins-bot has submitted this change and it was merged. Change subject: Fixed spacing .. Fixed spacing - Added newline at end of file - Removed double spaces/newlines - Added space after if/function and parentheses/brackets - Removed space before comma/cast - Fixed indent of some lines Change-Id: I29867ffdffdfb7d2b56997e9393497c7dc12f7d3 --- M includes/MovePage.php M includes/OutputPage.php M includes/PrefixSearch.php M includes/cache/bloom/BloomCache.php M includes/db/DatabaseMssql.php M includes/filerepo/file/File.php M includes/mail/MailAddress.php M includes/pager/IndexPager.php M includes/resourceloader/ResourceLoaderWikiModule.php M includes/site/SiteSQLStore.php M includes/specials/SpecialCategories.php M includes/specials/SpecialWantedfiles.php M includes/upload/UploadBase.php M tests/phpunit/includes/changes/EnhancedChangesListTest.php M tests/phpunit/includes/config/HashConfigTest.php M tests/phpunit/includes/mail/MailAddressTest.php M tests/phpunit/includes/specialpage/SpecialPageFactoryTest.php 17 files changed, 21 insertions(+), 25 deletions(-) Approvals: Parent5446: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/MovePage.php b/includes/MovePage.php index cea91d2..5c9490b 100644 --- a/includes/MovePage.php +++ b/includes/MovePage.php @@ -423,5 +423,4 @@ $logid = $logEntry-insert(); $logEntry-publish( $logid ); } - -} \ No newline at end of file +} diff --git a/includes/OutputPage.php b/includes/OutputPage.php index 3321747..e1b6e0e 100644 --- a/includes/OutputPage.php +++ b/includes/OutputPage.php @@ -2769,7 +2769,6 @@ ); $context = new ResourceLoaderContext( $resourceLoader, new FauxRequest( $query ) ); - // Extract modules that know they're empty and see if we have one or more // raw modules $isRaw = false; diff --git a/includes/PrefixSearch.php b/includes/PrefixSearch.php index 718750f..1f684fb 100644 --- a/includes/PrefixSearch.php +++ b/includes/PrefixSearch.php @@ -195,7 +195,7 @@ // Unlike SpecialPage itself, we want the canonical forms of both // canonical and alias title forms... $keys = array(); - foreach ( SpecialPageFactory::getNames() as $page ) { + foreach ( SpecialPageFactory::getNames() as $page ) { $keys[$wgContLang-caseFold( $page )] = $page; } diff --git a/includes/cache/bloom/BloomCache.php b/includes/cache/bloom/BloomCache.php index 236db95..a15b461 100644 --- a/includes/cache/bloom/BloomCache.php +++ b/includes/cache/bloom/BloomCache.php @@ -318,6 +318,6 @@ } protected function doGetStatus( $virtualKey ) { - return array( 'lastID' = null, 'asOfTime' = null, 'epoch' = null ) ; + return array( 'lastID' = null, 'asOfTime' = null, 'epoch' = null ); } } diff --git a/includes/db/DatabaseMssql.php b/includes/db/DatabaseMssql.php index af3cc72..ab8d366 100644 --- a/includes/db/DatabaseMssql.php +++ b/includes/db/DatabaseMssql.php @@ -692,7 +692,7 @@ if ( !is_null( $identity ) ) { // then we want to get the identity column value we were assigned and save it off $row = $ret-fetchObject(); - if( is_object( $row ) ){ + if ( is_object( $row ) ) { $this-mInsertId = $row-$identity; } } diff --git a/includes/filerepo/file/File.php b/includes/filerepo/file/File.php index b574c5e..7563d64 100644 --- a/includes/filerepo/file/File.php +++ b/includes/filerepo/file/File.php @@ -1237,7 +1237,7 @@ $that = $this; $work = new PoolCounterWorkViaCallback( 'GetLocalFileCopy', sha1( $this-getName() ), array( - 'doWork' = function() use ( $that ) { + 'doWork' = function () use ( $that ) { return $that-getLocalRefPath(); } ) diff --git a/includes/mail/MailAddress.php b/includes/mail/MailAddress.php index 6817908..7a228bd 100644 --- a/includes/mail/MailAddress.php +++ b/includes/mail/MailAddress.php @@ -38,7 +38,7 @@ function __construct( $address, $name = null, $realName = null ) { if ( is_object( $address ) $address instanceof User ) { // Old calling format, now deprecated - wfDeprecated( __METHOD__ . ' with a User object' , '1.24' ); +
[MediaWiki-commits] [Gerrit] Fixed spacing - change (mediawiki/core)
jenkins-bot has submitted this change and it was merged. Change subject: Fixed spacing .. Fixed spacing - Added space after reserved words: function, foreach, if - Combined 'else if' into elseif - Added braces to one-line statements - Added spaces after comma, before parentheses Change-Id: Ie5bbf680d6fbe0f0872dab2700c16b1394906a72 --- M includes/Revision.php M includes/Setup.php M includes/Title.php M includes/WatchedItem.php M includes/htmlform/HTMLAutoCompleteSelectField.php M includes/htmlform/HTMLForm.php M includes/objectcache/MemcachedBagOStuff.php M includes/search/SearchHighlighter.php M includes/skins/SkinFactory.php M includes/specials/SpecialImport.php M tests/parser/parserTest.inc M tests/phpunit/MediaWikiTestCase.php M tests/phpunit/includes/deferred/DeferredUpdatesTest.php M tests/phpunit/includes/parser/NewParserTest.php M tests/phpunit/includes/parser/TidyTest.php M tests/phpunit/includes/resourceloader/ResourceLoaderModuleTest.php M tests/phpunit/includes/skins/SkinFactoryTest.php M tests/testHelpers.inc 18 files changed, 36 insertions(+), 31 deletions(-) Approvals: Aaron Schulz: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/Revision.php b/includes/Revision.php index cad9f2c..28a825d 100644 --- a/includes/Revision.php +++ b/includes/Revision.php @@ -1658,7 +1658,7 @@ * instead of just plain userrights * @return bool */ - public static function userCanBitfield( $bitfield, $field, User $user = null , + public static function userCanBitfield( $bitfield, $field, User $user = null, Title $title = null ) { if ( $bitfield $field ) { // aspect is deleted @@ -1680,7 +1680,7 @@ } else { $text = $title-getPrefixedText(); wfDebug( Checking for $permissionlist on $text due to $field match on $bitfield\n ); - foreach( $permissions as $perm ) { + foreach ( $permissions as $perm ) { if ( $title-userCan( $perm, $user ) ) { return true; } diff --git a/includes/Setup.php b/includes/Setup.php index acceb59..6dbaac6 100644 --- a/includes/Setup.php +++ b/includes/Setup.php @@ -265,16 +265,16 @@ // Register skins // Use a closure to avoid leaking into global state -call_user_func( function() use ( $wgValidSkinNames ) { +call_user_func( function () use ( $wgValidSkinNames ) { $factory = SkinFactory::getDefaultInstance(); foreach ( $wgValidSkinNames as $name = $skin ) { - $factory-register( $name, $skin, function() use ( $name, $skin ) { + $factory-register( $name, $skin, function () use ( $name, $skin ) { $class = Skin$skin; return new $class( $name ); } ); } // Register a hidden fallback skin - $factory-register( 'fallback', 'Fallback', function() { + $factory-register( 'fallback', 'Fallback', function () { return new SkinFallback; } ); } ); diff --git a/includes/Title.php b/includes/Title.php index bcf9cbd..7fdeb05 100644 --- a/includes/Title.php +++ b/includes/Title.php @@ -2265,7 +2265,7 @@ } elseif ( $action == 'delete' ) { $tempErrors = $this-checkPageRestrictions( 'edit', $user, array(), $doExpensiveQueries, true ); - if( !$tempErrors ) { + if ( !$tempErrors ) { $tempErrors = $this-checkCascadingSourcesRestrictions( 'edit', $user, $tempErrors, $doExpensiveQueries, true ); } diff --git a/includes/WatchedItem.php b/includes/WatchedItem.php index 488932c..ab136b8 100644 --- a/includes/WatchedItem.php +++ b/includes/WatchedItem.php @@ -309,7 +309,7 @@ } $dbw = wfGetDB( DB_MASTER ); - foreach( array_chunk( $rows, 100 ) as $toInsert ) { + foreach ( array_chunk( $rows, 100 ) as $toInsert ) { // Use INSERT IGNORE to avoid overwriting the notification timestamp // if there's already an entry for this page $dbw-insert( 'watchlist', $toInsert, __METHOD__, 'IGNORE' ); diff --git a/includes/htmlform/HTMLAutoCompleteSelectField.php b/includes/htmlform/HTMLAutoCompleteSelectField.php index 4ea5e99..4905362 100644 --- a/includes/htmlform/HTMLAutoCompleteSelectField.php +++ b/includes/htmlform/HTMLAutoCompleteSelectField.php @@ -106,7 +106,7 @@ if ( $this-getOptions() ) {
[MediaWiki-commits] [Gerrit] Fixed spacing - change (mediawiki/core)
Umherirrender has uploaded a new change for review. https://gerrit.wikimedia.org/r/153836 Change subject: Fixed spacing .. Fixed spacing - Added newline at end of files - Added/Removed spaces around comma, parentheses and negation - Added space after function word Change-Id: I2dd338153aeb5f07702ba015945e95c7d0ae673b --- M includes/api/ApiModuleManager.php M tests/phpunit/includes/api/ApiModuleManagerTest.php M tests/phpunit/includes/content/JSONContentTest.php M tests/phpunit/includes/skins/SkinFactoryTest.php 4 files changed, 11 insertions(+), 12 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/36/153836/1 diff --git a/includes/api/ApiModuleManager.php b/includes/api/ApiModuleManager.php index fdf3f02..f7d0ccf 100644 --- a/includes/api/ApiModuleManager.php +++ b/includes/api/ApiModuleManager.php @@ -195,7 +195,7 @@ // create instance from factory $instance = call_user_func( $factory, $this-mParent, $name ); - if ( ! $instance instanceof $class ) { + if ( !$instance instanceof $class ) { throw new MWException( The factory function for module $name did not return an instance of $class! ); } } else { diff --git a/tests/phpunit/includes/api/ApiModuleManagerTest.php b/tests/phpunit/includes/api/ApiModuleManagerTest.php index 1ac9b9d..19c0a7d 100644 --- a/tests/phpunit/includes/api/ApiModuleManagerTest.php +++ b/tests/phpunit/includes/api/ApiModuleManagerTest.php @@ -39,8 +39,8 @@ 'logout', 'action', 'ApiLogout', - function( ApiMain $main, $action ) { - return new ApiLogout( $main, $action ); + function ( ApiMain $main, $action ) { + return new ApiLogout( $main, $action ); }, ), ); @@ -80,7 +80,7 @@ ), 'logout' = array( 'class' = 'ApiLogout', - 'factory' = function( ApiMain $main, $action ) { + 'factory' = function ( ApiMain $main, $action ) { return new ApiLogout( $main, $action ); }, ), @@ -113,9 +113,9 @@ ), 'logout' = array( 'class' = 'ApiLogout', - 'factory' = function( ApiMain $main, $action ) { - return new ApiLogout( $main, $action ); - }, + 'factory' = function ( ApiMain $main, $action ) { + return new ApiLogout( $main, $action ); + }, ), ); diff --git a/tests/phpunit/includes/content/JSONContentTest.php b/tests/phpunit/includes/content/JSONContentTest.php index ec74574..acfdc0e 100644 --- a/tests/phpunit/includes/content/JSONContentTest.php +++ b/tests/phpunit/includes/content/JSONContentTest.php @@ -27,7 +27,7 @@ * @dataProvider provideDataToEncode */ public function testBeautifyUsesFormatJson( $data ) { - $obj = new JSONContent( FormatJson::encode( $data) ); + $obj = new JSONContent( FormatJson::encode( $data ) ); $this-assertEquals( FormatJson::encode( $data, true ), $obj-beautifyJSON() ); } @@ -46,7 +46,7 @@ */ public function testPreSaveTransform( $data ) { $obj = new JSONContent( FormatJson::encode( $data ) ); - $newObj = $obj-preSaveTransform( $this-getMockTitle(), $this-getMockUser() , $this-getMockParserOptions() ); + $newObj = $obj-preSaveTransform( $this-getMockTitle(), $this-getMockUser(), $this-getMockParserOptions() ); $this-assertTrue( $newObj-equals( new JSONContent( FormatJson::encode( $data, true ) ) ) ); } @@ -112,5 +112,4 @@ ), ); } - -} \ No newline at end of file +} diff --git a/tests/phpunit/includes/skins/SkinFactoryTest.php b/tests/phpunit/includes/skins/SkinFactoryTest.php index 4497cba..7b7c7f8 100644 --- a/tests/phpunit/includes/skins/SkinFactoryTest.php +++ b/tests/phpunit/includes/skins/SkinFactoryTest.php @@ -7,7 +7,7 @@ */ public function testRegister() {
[MediaWiki-commits] [Gerrit] Fixed spacing - change (mediawiki/core)
jenkins-bot has submitted this change and it was merged. Change subject: Fixed spacing .. Fixed spacing - Added newline at end of files - Added/Removed spaces around comma, parentheses and negation - Added space after function word Change-Id: I2dd338153aeb5f07702ba015945e95c7d0ae673b --- M includes/api/ApiModuleManager.php M tests/phpunit/includes/api/ApiModuleManagerTest.php M tests/phpunit/includes/content/JSONContentTest.php M tests/phpunit/includes/skins/SkinFactoryTest.php 4 files changed, 11 insertions(+), 12 deletions(-) Approvals: Jdlrobson: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/api/ApiModuleManager.php b/includes/api/ApiModuleManager.php index fdf3f02..f7d0ccf 100644 --- a/includes/api/ApiModuleManager.php +++ b/includes/api/ApiModuleManager.php @@ -195,7 +195,7 @@ // create instance from factory $instance = call_user_func( $factory, $this-mParent, $name ); - if ( ! $instance instanceof $class ) { + if ( !$instance instanceof $class ) { throw new MWException( The factory function for module $name did not return an instance of $class! ); } } else { diff --git a/tests/phpunit/includes/api/ApiModuleManagerTest.php b/tests/phpunit/includes/api/ApiModuleManagerTest.php index 1ac9b9d..19c0a7d 100644 --- a/tests/phpunit/includes/api/ApiModuleManagerTest.php +++ b/tests/phpunit/includes/api/ApiModuleManagerTest.php @@ -39,8 +39,8 @@ 'logout', 'action', 'ApiLogout', - function( ApiMain $main, $action ) { - return new ApiLogout( $main, $action ); + function ( ApiMain $main, $action ) { + return new ApiLogout( $main, $action ); }, ), ); @@ -80,7 +80,7 @@ ), 'logout' = array( 'class' = 'ApiLogout', - 'factory' = function( ApiMain $main, $action ) { + 'factory' = function ( ApiMain $main, $action ) { return new ApiLogout( $main, $action ); }, ), @@ -113,9 +113,9 @@ ), 'logout' = array( 'class' = 'ApiLogout', - 'factory' = function( ApiMain $main, $action ) { - return new ApiLogout( $main, $action ); - }, + 'factory' = function ( ApiMain $main, $action ) { + return new ApiLogout( $main, $action ); + }, ), ); diff --git a/tests/phpunit/includes/content/JSONContentTest.php b/tests/phpunit/includes/content/JSONContentTest.php index ec74574..acfdc0e 100644 --- a/tests/phpunit/includes/content/JSONContentTest.php +++ b/tests/phpunit/includes/content/JSONContentTest.php @@ -27,7 +27,7 @@ * @dataProvider provideDataToEncode */ public function testBeautifyUsesFormatJson( $data ) { - $obj = new JSONContent( FormatJson::encode( $data) ); + $obj = new JSONContent( FormatJson::encode( $data ) ); $this-assertEquals( FormatJson::encode( $data, true ), $obj-beautifyJSON() ); } @@ -46,7 +46,7 @@ */ public function testPreSaveTransform( $data ) { $obj = new JSONContent( FormatJson::encode( $data ) ); - $newObj = $obj-preSaveTransform( $this-getMockTitle(), $this-getMockUser() , $this-getMockParserOptions() ); + $newObj = $obj-preSaveTransform( $this-getMockTitle(), $this-getMockUser(), $this-getMockParserOptions() ); $this-assertTrue( $newObj-equals( new JSONContent( FormatJson::encode( $data, true ) ) ) ); } @@ -112,5 +112,4 @@ ), ); } - -} \ No newline at end of file +} diff --git a/tests/phpunit/includes/skins/SkinFactoryTest.php b/tests/phpunit/includes/skins/SkinFactoryTest.php index 4497cba..7b7c7f8 100644 --- a/tests/phpunit/includes/skins/SkinFactoryTest.php +++ b/tests/phpunit/includes/skins/SkinFactoryTest.php @@ -7,7 +7,7 @@ */ public function testRegister() { $factory = new SkinFactory(); -
[MediaWiki-commits] [Gerrit] Fixed spacing - change (mediawiki/core)
Umherirrender has uploaded a new change for review. https://gerrit.wikimedia.org/r/151600 Change subject: Fixed spacing .. Fixed spacing - Removed spaces around array index - Changed else if to elseif - Added space after foreach/if/function - include_once is not a function Change-Id: I7745ae791d1b7e60cfebec6d268513a9cc071bdd --- M includes/Cookie.php M includes/Skin.php M includes/media/SVG.php M includes/resourceloader/ResourceLoader.php M tests/phpunit/phpunit.php 5 files changed, 18 insertions(+), 17 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/00/151600/1 diff --git a/includes/Cookie.php b/includes/Cookie.php index 8b5906a..cb04190 100644 --- a/includes/Cookie.php +++ b/includes/Cookie.php @@ -94,8 +94,9 @@ // Don't allow a trailing dot or addresses without a or just a leading dot if ( substr( $domain, -1 ) == '.' || -count( $dc ) = 1 || -count( $dc ) == 2 $dc[0] === '' ) { + count( $dc ) = 1 || + count( $dc ) == 2 $dc[0] === '' + ) { return false; } diff --git a/includes/Skin.php b/includes/Skin.php index fd737c0..a59d567 100644 --- a/includes/Skin.php +++ b/includes/Skin.php @@ -220,7 +220,7 @@ # is no longer valid. wfDebug( Skin class does not exist: $className\n ); - $fallback = $skinNames[ Skin::normalizeKey( $wgFallbackSkin ) ]; + $fallback = $skinNames[Skin::normalizeKey( $wgFallbackSkin )]; $className = Skin{$fallback}; } } diff --git a/includes/media/SVG.php b/includes/media/SVG.php index 9245d42..a0ce806 100644 --- a/includes/media/SVG.php +++ b/includes/media/SVG.php @@ -202,7 +202,7 @@ $tmpDir = wfTempDir() . '/svg_' . wfRandomString( 24 ); $lnPath = $tmpDir/ . basename( $srcPath ); $ok = mkdir( $tmpDir, 0771 ) symlink( $srcPath, $lnPath ); - $cleaner = new ScopedCallback( function() use ( $tmpDir, $lnPath ) { + $cleaner = new ScopedCallback( function () use ( $tmpDir, $lnPath ) { wfSuppressWarnings(); unlink( $lnPath ); rmdir( $tmpDir ); diff --git a/includes/resourceloader/ResourceLoader.php b/includes/resourceloader/ResourceLoader.php index bcb3842..d46f0a3 100644 --- a/includes/resourceloader/ResourceLoader.php +++ b/includes/resourceloader/ResourceLoader.php @@ -307,11 +307,11 @@ // If $name is preceded with a '+', the defined style files will be added to 'default' // skinStyles, otherwise 'default' will be ignored as it normally would be. - if ( isset( $skinStyles[ $name ] ) ) { - $paths = (array)$skinStyles[ $name ]; + if ( isset( $skinStyles[$name] ) ) { + $paths = (array)$skinStyles[$name]; $styleFiles = array(); - } else if ( isset( $skinStyles[ '+' . $name ] ) ) { - $paths = (array)$skinStyles[ '+' . $name ]; + } elseif ( isset( $skinStyles['+' . $name] ) ) { + $paths = (array)$skinStyles['+' . $name]; $styleFiles = isset( $this-moduleInfos[$name]['skinStyles']['default'] ) ? $this-moduleInfos[$name]['skinStyles']['default'] : array(); diff --git a/tests/phpunit/phpunit.php b/tests/phpunit/phpunit.php index 63313cf..1125504 100755 --- a/tests/phpunit/phpunit.php +++ b/tests/phpunit/phpunit.php @@ -148,17 +148,17 @@ } $key = array_search( '--debug-tests', $_SERVER['argv'] ); - if( $key !== false array_search( '--printer', $_SERVER['argv'] ) === false ) { + if ( $key !== false array_search( '--printer', $_SERVER['argv'] ) === false ) { unset( $_SERVER['argv'][$key] ); array_splice( $_SERVER['argv'], 1, 0, 'MediaWikiPHPUnitTestListener' ); array_splice( $_SERVER['argv'], 1, 0, '--printer' ); } - foreach( self::$additionalOptions as $option = $default ) { + foreach ( self::$additionalOptions as $option = $default ) {
[MediaWiki-commits] [Gerrit] Fixed spacing - change (mediawiki/core)
jenkins-bot has submitted this change and it was merged. Change subject: Fixed spacing .. Fixed spacing - Removed spaces around array index - Changed else if to elseif - Added space after foreach/if/function - include_once is not a function Change-Id: I7745ae791d1b7e60cfebec6d268513a9cc071bdd --- M includes/Cookie.php M includes/Skin.php M includes/media/SVG.php M includes/resourceloader/ResourceLoader.php M tests/phpunit/phpunit.php 5 files changed, 18 insertions(+), 17 deletions(-) Approvals: Siebrand: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/Cookie.php b/includes/Cookie.php index 8b5906a..cb04190 100644 --- a/includes/Cookie.php +++ b/includes/Cookie.php @@ -94,8 +94,9 @@ // Don't allow a trailing dot or addresses without a or just a leading dot if ( substr( $domain, -1 ) == '.' || -count( $dc ) = 1 || -count( $dc ) == 2 $dc[0] === '' ) { + count( $dc ) = 1 || + count( $dc ) == 2 $dc[0] === '' + ) { return false; } diff --git a/includes/Skin.php b/includes/Skin.php index fd737c0..a59d567 100644 --- a/includes/Skin.php +++ b/includes/Skin.php @@ -220,7 +220,7 @@ # is no longer valid. wfDebug( Skin class does not exist: $className\n ); - $fallback = $skinNames[ Skin::normalizeKey( $wgFallbackSkin ) ]; + $fallback = $skinNames[Skin::normalizeKey( $wgFallbackSkin )]; $className = Skin{$fallback}; } } diff --git a/includes/media/SVG.php b/includes/media/SVG.php index 9245d42..a0ce806 100644 --- a/includes/media/SVG.php +++ b/includes/media/SVG.php @@ -202,7 +202,7 @@ $tmpDir = wfTempDir() . '/svg_' . wfRandomString( 24 ); $lnPath = $tmpDir/ . basename( $srcPath ); $ok = mkdir( $tmpDir, 0771 ) symlink( $srcPath, $lnPath ); - $cleaner = new ScopedCallback( function() use ( $tmpDir, $lnPath ) { + $cleaner = new ScopedCallback( function () use ( $tmpDir, $lnPath ) { wfSuppressWarnings(); unlink( $lnPath ); rmdir( $tmpDir ); diff --git a/includes/resourceloader/ResourceLoader.php b/includes/resourceloader/ResourceLoader.php index bcb3842..d46f0a3 100644 --- a/includes/resourceloader/ResourceLoader.php +++ b/includes/resourceloader/ResourceLoader.php @@ -307,11 +307,11 @@ // If $name is preceded with a '+', the defined style files will be added to 'default' // skinStyles, otherwise 'default' will be ignored as it normally would be. - if ( isset( $skinStyles[ $name ] ) ) { - $paths = (array)$skinStyles[ $name ]; + if ( isset( $skinStyles[$name] ) ) { + $paths = (array)$skinStyles[$name]; $styleFiles = array(); - } else if ( isset( $skinStyles[ '+' . $name ] ) ) { - $paths = (array)$skinStyles[ '+' . $name ]; + } elseif ( isset( $skinStyles['+' . $name] ) ) { + $paths = (array)$skinStyles['+' . $name]; $styleFiles = isset( $this-moduleInfos[$name]['skinStyles']['default'] ) ? $this-moduleInfos[$name]['skinStyles']['default'] : array(); diff --git a/tests/phpunit/phpunit.php b/tests/phpunit/phpunit.php index 63313cf..1125504 100755 --- a/tests/phpunit/phpunit.php +++ b/tests/phpunit/phpunit.php @@ -148,17 +148,17 @@ } $key = array_search( '--debug-tests', $_SERVER['argv'] ); - if( $key !== false array_search( '--printer', $_SERVER['argv'] ) === false ) { + if ( $key !== false array_search( '--printer', $_SERVER['argv'] ) === false ) { unset( $_SERVER['argv'][$key] ); array_splice( $_SERVER['argv'], 1, 0, 'MediaWikiPHPUnitTestListener' ); array_splice( $_SERVER['argv'], 1, 0, '--printer' ); } - foreach( self::$additionalOptions as $option = $default ) { + foreach ( self::$additionalOptions as $option = $default ) { $key = array_search( '--' . $option,
[MediaWiki-commits] [Gerrit] Fixed spacing - change (mediawiki/core)
jenkins-bot has submitted this change and it was merged. Change subject: Fixed spacing .. Fixed spacing - Removed spaces after not operator (!) - Removed spaces inside array index - use tab as indent instead of spaces - Add newline at end of file - Removed spaces after casts Change-Id: I9ba17c4385fcb43d38998d45f89cf42952bc791b --- M includes/AjaxDispatcher.php M includes/AjaxResponse.php M includes/GlobalFunctions.php M includes/HtmlFormatter.php M includes/HttpFunctions.php M includes/Import.php M includes/Linker.php M includes/OutputPage.php M includes/Preferences.php M includes/Setup.php M includes/UserMailer.php M includes/changes/EnhancedChangesList.php M includes/config/GlobalVarConfig.php M includes/deferred/ViewCountUpdate.php M includes/filebackend/SwiftFileBackend.php M includes/filerepo/file/File.php M includes/installer/WebInstallerPage.php M includes/media/Bitmap.php M includes/media/DjVu.php M includes/page/Article.php M includes/page/WikiFilePage.php M includes/page/WikiPage.php M includes/resourceloader/ResourceLoaderStartUpModule.php M includes/search/SearchHighlighter.php M includes/specials/SpecialWhatlinkshere.php M languages/Language.php M languages/messages/MessagesFrp.php M tests/parser/parserTest.inc M tests/phpunit/includes/StatusTest.php M tests/phpunit/includes/api/ApiTestCase.php M tests/phpunit/includes/exception/MWExceptionHandlerTest.php M tests/phpunit/includes/media/DjVuTest.php M tests/phpunit/includes/specials/SpecialMyLanguageTest.php M tests/phpunit/structure/ResourcesTest.php M tests/testHelpers.inc 35 files changed, 77 insertions(+), 77 deletions(-) Approvals: Krinkle: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/AjaxDispatcher.php b/includes/AjaxDispatcher.php index c9ca128..dde8467 100644 --- a/includes/AjaxDispatcher.php +++ b/includes/AjaxDispatcher.php @@ -55,7 +55,7 @@ $this-mode = ; - if ( ! empty( $_GET[rs] ) ) { + if ( !empty( $_GET[rs] ) ) { $this-mode = get; } @@ -66,7 +66,7 @@ switch ( $this-mode ) { case 'get': $this-func_name = isset( $_GET[rs] ) ? $_GET[rs] : ''; - if ( ! empty( $_GET[rsargs] ) ) { + if ( !empty( $_GET[rsargs] ) ) { $this-args = $_GET[rsargs]; } else { $this-args = array(); @@ -74,7 +74,7 @@ break; case 'post': $this-func_name = isset( $_POST[rs] ) ? $_POST[rs] : ''; - if ( ! empty( $_POST[rsargs] ) ) { + if ( !empty( $_POST[rsargs] ) ) { $this-args = $_POST[rsargs]; } else { $this-args = array(); @@ -105,7 +105,7 @@ wfProfileIn( __METHOD__ ); - if ( ! in_array( $this-func_name, $wgAjaxExportList ) ) { + if ( !in_array( $this-func_name, $wgAjaxExportList ) ) { wfDebug( __METHOD__ . ' Bad Request for unknown function ' . $this-func_name . \n ); wfHttpError( diff --git a/includes/AjaxResponse.php b/includes/AjaxResponse.php index a3808a5..41cbd24 100644 --- a/includes/AjaxResponse.php +++ b/includes/AjaxResponse.php @@ -132,7 +132,7 @@ * @param string $text */ function addText( $text ) { - if ( ! $this-mDisabled $text ) { + if ( !$this-mDisabled $text ) { $this-mText .= $text; } } @@ -141,7 +141,7 @@ * Output text */ function printText() { - if ( ! $this-mDisabled ) { + if ( !$this-mDisabled ) { print $this-mText; } } diff --git a/includes/GlobalFunctions.php b/includes/GlobalFunctions.php index 6850734..8bcd56e 100644 --- a/includes/GlobalFunctions.php +++ b/includes/GlobalFunctions.php @@ -1873,7 +1873,7 @@ $responseTime = round( ( microtime( true ) - $wgRequestTime ) * 1000 ); $reportVars = array( 'wgBackendResponseTime' = $responseTime ); if ( $wgShowHostnames ) { - $reportVars[ 'wgHostname' ] = wfHostname(); + $reportVars['wgHostname'] = wfHostname(); } return Skin::makeVariablesScript( $reportVars ); } diff --git a/includes/HtmlFormatter.php b/includes/HtmlFormatter.php index ebced70..02c6c5e 100644 --- a/includes/HtmlFormatter.php +++ b/includes/HtmlFormatter.php @@ -237,7 +237,7 @@ private function fixLibXML( $html ) { wfProfileIn( __METHOD__ );
[MediaWiki-commits] [Gerrit] Fixed spacing - change (mediawiki/core)
Umherirrender has uploaded a new change for review. https://gerrit.wikimedia.org/r/148062 Change subject: Fixed spacing .. Fixed spacing - Removed spaces after not operator (!) - Removed spaces inside array index - use tab as indent instead of spaces Change-Id: I9ba17c4385fcb43d38998d45f89cf42952bc791b --- M includes/AjaxDispatcher.php M includes/AjaxResponse.php M includes/GlobalFunctions.php M includes/HtmlFormatter.php M includes/HttpFunctions.php M includes/Import.php M includes/Linker.php M includes/OutputPage.php M includes/Preferences.php M includes/Setup.php M includes/UserMailer.php M includes/changes/EnhancedChangesList.php M includes/config/GlobalVarConfig.php M includes/filebackend/SwiftFileBackend.php M includes/filerepo/file/File.php M includes/page/Article.php M includes/page/WikiFilePage.php M includes/page/WikiPage.php M includes/resourceloader/ResourceLoaderStartUpModule.php M includes/search/SearchHighlighter.php M languages/Language.php M languages/messages/MessagesFrp.php M tests/parser/parserTest.inc M tests/phpunit/includes/StatusTest.php M tests/phpunit/includes/api/ApiTestCase.php M tests/phpunit/includes/exception/MWExceptionHandlerTest.php M tests/testHelpers.inc 27 files changed, 67 insertions(+), 67 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/62/148062/1 diff --git a/includes/AjaxDispatcher.php b/includes/AjaxDispatcher.php index c9ca128..dde8467 100644 --- a/includes/AjaxDispatcher.php +++ b/includes/AjaxDispatcher.php @@ -55,7 +55,7 @@ $this-mode = ; - if ( ! empty( $_GET[rs] ) ) { + if ( !empty( $_GET[rs] ) ) { $this-mode = get; } @@ -66,7 +66,7 @@ switch ( $this-mode ) { case 'get': $this-func_name = isset( $_GET[rs] ) ? $_GET[rs] : ''; - if ( ! empty( $_GET[rsargs] ) ) { + if ( !empty( $_GET[rsargs] ) ) { $this-args = $_GET[rsargs]; } else { $this-args = array(); @@ -74,7 +74,7 @@ break; case 'post': $this-func_name = isset( $_POST[rs] ) ? $_POST[rs] : ''; - if ( ! empty( $_POST[rsargs] ) ) { + if ( !empty( $_POST[rsargs] ) ) { $this-args = $_POST[rsargs]; } else { $this-args = array(); @@ -105,7 +105,7 @@ wfProfileIn( __METHOD__ ); - if ( ! in_array( $this-func_name, $wgAjaxExportList ) ) { + if ( !in_array( $this-func_name, $wgAjaxExportList ) ) { wfDebug( __METHOD__ . ' Bad Request for unknown function ' . $this-func_name . \n ); wfHttpError( diff --git a/includes/AjaxResponse.php b/includes/AjaxResponse.php index a3808a5..41cbd24 100644 --- a/includes/AjaxResponse.php +++ b/includes/AjaxResponse.php @@ -132,7 +132,7 @@ * @param string $text */ function addText( $text ) { - if ( ! $this-mDisabled $text ) { + if ( !$this-mDisabled $text ) { $this-mText .= $text; } } @@ -141,7 +141,7 @@ * Output text */ function printText() { - if ( ! $this-mDisabled ) { + if ( !$this-mDisabled ) { print $this-mText; } } diff --git a/includes/GlobalFunctions.php b/includes/GlobalFunctions.php index feca005..2981dbd 100644 --- a/includes/GlobalFunctions.php +++ b/includes/GlobalFunctions.php @@ -1883,7 +1883,7 @@ $responseTime = round( ( microtime( true ) - $wgRequestTime ) * 1000 ); $reportVars = array( 'wgBackendResponseTime' = $responseTime ); if ( $wgShowHostnames ) { - $reportVars[ 'wgHostname' ] = wfHostname(); + $reportVars['wgHostname'] = wfHostname(); } return Skin::makeVariablesScript( $reportVars ); } diff --git a/includes/HtmlFormatter.php b/includes/HtmlFormatter.php index ebced70..02c6c5e 100644 --- a/includes/HtmlFormatter.php +++ b/includes/HtmlFormatter.php @@ -237,7 +237,7 @@ private function fixLibXML( $html ) { wfProfileIn( __METHOD__ ); static $replacements; - if ( ! $replacements ) { + if ( !$replacements ) { // We don't include rules like '#34;' = 'amp;quot;' because entities had already been // normalized by libxml. Using this function with input not sanitized by libxml is UNSAFE!
[MediaWiki-commits] [Gerrit] Fixed spacing - change (mediawiki/core)
Umherirrender has uploaded a new change for review. https://gerrit.wikimedia.org/r/147835 Change subject: Fixed spacing .. Fixed spacing - Added/removed spaces around parenthesis - Added space after switch/if/foreach - changed else if to elseif Change-Id: I99cda543e0e077320091addd75c188cb6e3a42c2 --- M includes/Html.php M includes/Import.php M includes/Title.php M includes/api/ApiQuerySiteinfo.php M includes/api/ApiResult.php M includes/db/DatabasePostgres.php M includes/db/DatabaseSqlite.php M includes/htmlform/HTMLSelectField.php M includes/installer/MysqlInstaller.php M includes/installer/PostgresInstaller.php M includes/installer/PostgresUpdater.php M includes/media/XCF.php M includes/objectcache/BagOStuff.php M includes/page/ImagePage.php M includes/poolcounter/PoolCounterRedis.php M includes/profiler/Profiler.php M includes/specials/SpecialContributions.php M includes/specials/SpecialEditWatchlist.php M includes/specials/SpecialPageLanguage.php M includes/specials/SpecialTrackingCategories.php M includes/utils/MWCryptHKDF.php M languages/messages/MessagesCs.php M languages/messages/MessagesEn.php M languages/messages/MessagesKk_arab.php M languages/messages/MessagesKk_cyrl.php M languages/messages/MessagesKk_latn.php M languages/messages/MessagesOs.php M languages/messages/MessagesSv.php M maintenance/compareParserCache.php M maintenance/language/generateCollationData.php M mw-config/index.php M skins/Vector/VectorTemplate.php M tests/phpunit/includes/GlobalFunctions/wfTimestampTest.php M tests/phpunit/includes/ImportTest.php M tests/phpunit/includes/LinksUpdateTest.php M tests/phpunit/includes/OutputPageTest.php M tests/phpunit/includes/TimeAdjustTest.php M tests/phpunit/includes/actions/ActionTest.php M tests/phpunit/includes/config/ConfigFactoryTest.php M tests/phpunit/includes/db/DatabaseSqliteTest.php M tests/phpunit/includes/debug/MWDebugTest.php M tests/phpunit/includes/media/MediaWikiMediaTestCase.php M tests/phpunit/includes/parser/ParserMethodsTest.php M tests/phpunit/includes/poolcounter/PoolCounterTest.php M tests/phpunit/phpunit.php 45 files changed, 74 insertions(+), 75 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/35/147835/1 diff --git a/includes/Html.php b/includes/Html.php index 5f4655c..dbabbae 100644 --- a/includes/Html.php +++ b/includes/Html.php @@ -502,7 +502,7 @@ // Remove duplicates and create the string $value = implode( ' ', array_unique( $value ) ); - } else if ( is_array( $value ) ) { + } elseif ( is_array( $value ) ) { throw new MWException( HTML attribute $key can not contain a list of values ); } diff --git a/includes/Import.php b/includes/Import.php index 177d023..6aab157 100644 --- a/includes/Import.php +++ b/includes/Import.php @@ -45,7 +45,7 @@ function __construct( ImportStreamSource $source ) { $this-reader = new XMLReader(); - if ( !in_array( 'uploadsource', stream_get_wrappers() ) ) { + if ( !in_array( 'uploadsource', stream_get_wrappers() ) ) { stream_wrapper_register( 'uploadsource', 'UploadSourceAdapter' ); } $id = UploadSourceAdapter::registerSource( $source ); diff --git a/includes/Title.php b/includes/Title.php index 746ffab..b66e3e4 100644 --- a/includes/Title.php +++ b/includes/Title.php @@ -979,7 +979,7 @@ try { $formatter = self::getTitleFormatter(); return $formatter-getNamespaceName( $this-mNamespace, $this-mDbkeyform ); - } catch ( InvalidArgumentException $ex ) { + } catch ( InvalidArgumentException $ex ) { wfDebug( __METHOD__ . ': ' . $ex-getMessage() . \n ); return false; } diff --git a/includes/api/ApiQuerySiteinfo.php b/includes/api/ApiQuerySiteinfo.php index 089ce04..ab737d1 100644 --- a/includes/api/ApiQuerySiteinfo.php +++ b/includes/api/ApiQuerySiteinfo.php @@ -242,7 +242,7 @@ $data['articlepath'] = $config-get( 'ArticlePath' ); $data['scriptpath'] = $config-get( 'ScriptPath' ); $data['script'] = $config-get( 'Script' ); - $data['variantarticlepath'] = $config-get( 'VariantArticlePath' ); + $data['variantarticlepath'] = $config-get( 'VariantArticlePath' ); $data['server'] = $config-get( 'Server' ); $data['servername'] = $config-get( 'ServerName' ); $data['wikiid'] = wfWikiID(); @@ -420,7 +420,7 @@ } $val['url'] = wfExpandUrl( $row['iw_url'], PROTO_CURRENT ); - if (substr( $row['iw_url'], 0, 2)
[MediaWiki-commits] [Gerrit] Fixed spacing - change (mediawiki/core)
jenkins-bot has submitted this change and it was merged. Change subject: Fixed spacing .. Fixed spacing - Added/removed spaces around parenthesis - Added space after switch/if/foreach - changed else if to elseif Change-Id: I99cda543e0e077320091addd75c188cb6e3a42c2 --- M includes/Html.php M includes/Import.php M includes/Title.php M includes/api/ApiQuerySiteinfo.php M includes/api/ApiResult.php M includes/db/DatabasePostgres.php M includes/db/DatabaseSqlite.php M includes/htmlform/HTMLSelectField.php M includes/installer/MysqlInstaller.php M includes/installer/PostgresInstaller.php M includes/installer/PostgresUpdater.php M includes/media/XCF.php M includes/objectcache/BagOStuff.php M includes/page/ImagePage.php M includes/poolcounter/PoolCounterRedis.php M includes/profiler/Profiler.php M includes/specials/SpecialContributions.php M includes/specials/SpecialEditWatchlist.php M includes/specials/SpecialPageLanguage.php M includes/specials/SpecialTrackingCategories.php M includes/utils/MWCryptHKDF.php M languages/messages/MessagesCs.php M languages/messages/MessagesEn.php M languages/messages/MessagesKk_arab.php M languages/messages/MessagesKk_cyrl.php M languages/messages/MessagesKk_latn.php M languages/messages/MessagesOs.php M languages/messages/MessagesSv.php M maintenance/compareParserCache.php M maintenance/language/generateCollationData.php M mw-config/index.php M skins/Vector/VectorTemplate.php M tests/phpunit/includes/GlobalFunctions/wfTimestampTest.php M tests/phpunit/includes/ImportTest.php M tests/phpunit/includes/LinksUpdateTest.php M tests/phpunit/includes/OutputPageTest.php M tests/phpunit/includes/TimeAdjustTest.php M tests/phpunit/includes/actions/ActionTest.php M tests/phpunit/includes/config/ConfigFactoryTest.php M tests/phpunit/includes/db/DatabaseSqliteTest.php M tests/phpunit/includes/debug/MWDebugTest.php M tests/phpunit/includes/media/MediaWikiMediaTestCase.php M tests/phpunit/includes/parser/ParserMethodsTest.php M tests/phpunit/includes/poolcounter/PoolCounterTest.php M tests/phpunit/phpunit.php 45 files changed, 74 insertions(+), 75 deletions(-) Approvals: Krinkle: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/Html.php b/includes/Html.php index 5f4655c..dbabbae 100644 --- a/includes/Html.php +++ b/includes/Html.php @@ -502,7 +502,7 @@ // Remove duplicates and create the string $value = implode( ' ', array_unique( $value ) ); - } else if ( is_array( $value ) ) { + } elseif ( is_array( $value ) ) { throw new MWException( HTML attribute $key can not contain a list of values ); } diff --git a/includes/Import.php b/includes/Import.php index 177d023..6aab157 100644 --- a/includes/Import.php +++ b/includes/Import.php @@ -45,7 +45,7 @@ function __construct( ImportStreamSource $source ) { $this-reader = new XMLReader(); - if ( !in_array( 'uploadsource', stream_get_wrappers() ) ) { + if ( !in_array( 'uploadsource', stream_get_wrappers() ) ) { stream_wrapper_register( 'uploadsource', 'UploadSourceAdapter' ); } $id = UploadSourceAdapter::registerSource( $source ); diff --git a/includes/Title.php b/includes/Title.php index 746ffab..b66e3e4 100644 --- a/includes/Title.php +++ b/includes/Title.php @@ -979,7 +979,7 @@ try { $formatter = self::getTitleFormatter(); return $formatter-getNamespaceName( $this-mNamespace, $this-mDbkeyform ); - } catch ( InvalidArgumentException $ex ) { + } catch ( InvalidArgumentException $ex ) { wfDebug( __METHOD__ . ': ' . $ex-getMessage() . \n ); return false; } diff --git a/includes/api/ApiQuerySiteinfo.php b/includes/api/ApiQuerySiteinfo.php index 089ce04..ab737d1 100644 --- a/includes/api/ApiQuerySiteinfo.php +++ b/includes/api/ApiQuerySiteinfo.php @@ -242,7 +242,7 @@ $data['articlepath'] = $config-get( 'ArticlePath' ); $data['scriptpath'] = $config-get( 'ScriptPath' ); $data['script'] = $config-get( 'Script' ); - $data['variantarticlepath'] = $config-get( 'VariantArticlePath' ); + $data['variantarticlepath'] = $config-get( 'VariantArticlePath' ); $data['server'] = $config-get( 'Server' ); $data['servername'] = $config-get( 'ServerName' ); $data['wikiid'] = wfWikiID(); @@ -420,7 +420,7 @@ } $val['url'] = wfExpandUrl( $row['iw_url'], PROTO_CURRENT ); - if (substr( $row['iw_url'], 0, 2) == '//') { + if ( substr(
[MediaWiki-commits] [Gerrit] Fixed spacing - change (mediawiki/core)
Umherirrender has uploaded a new change for review. https://gerrit.wikimedia.org/r/119798 Change subject: Fixed spacing .. Fixed spacing - Added spaces after if/foreach/catch - Added new line before end of file - Added or removed spaces before/after parenthesis, comma - Added spaces around string concat Change-Id: I0590070f1b3542108e242730e8d9a3ba9831e94f --- M includes/MediaWikiVersionFetcher.php M includes/QueryPage.php M includes/Setup.php M includes/TimestampException.php M includes/TitleArrayFromResult.php M includes/User.php M includes/UserArray.php M includes/composer/ComposerVersionNormalizer.php M includes/db/DatabaseMssql.php M includes/db/DatabaseMysqli.php M includes/diff/DairikiDiff.php M includes/filebackend/SwiftFileBackend.php M includes/installer/MssqlInstaller.php M includes/objectcache/MemcachedClient.php M includes/parser/CoreParserFunctions.php M includes/profiler/ProfilerMwprof.php M includes/resourceloader/ResourceLoaderStartUpModule.php M includes/specials/SpecialChangePassword.php M includes/specials/SpecialUserrights.php M includes/specials/SpecialVersion.php M includes/specials/SpecialWatchlist.php M includes/upload/UploadBase.php M languages/classes/LanguageUz.php M languages/utils/CLDRPluralRuleEvaluator.php M maintenance/generateJsonI18n.php M skins/CologneBlue.php M skins/Vector.php M tests/parser/parserTest.inc M tests/phpunit/MediaWikiTestCase.php M tests/phpunit/includes/MWTimestampTest.php M tests/phpunit/includes/MediaWikiVersionFetcherTest.php M tests/phpunit/includes/MessageTest.php M tests/phpunit/includes/StatusTest.php M tests/phpunit/includes/TitleArrayFromResultTest.php M tests/phpunit/includes/UserArrayFromResultTest.php M tests/phpunit/includes/composer/ComposerVersionNormalizerTest.php M tests/phpunit/includes/diff/ArrayDiffFormatterTest.php M tests/phpunit/includes/diff/DiffOpTest.php M tests/phpunit/includes/exception/BadTitleErrorTest.php M tests/phpunit/includes/exception/ErrorPageErrorTest.php M tests/phpunit/includes/exception/MWExceptionTest.php M tests/phpunit/includes/exception/ReadOnlyErrorTest.php M tests/phpunit/includes/exception/ThrottledErrorTest.php M tests/phpunit/includes/site/SiteListTest.php M tests/phpunit/languages/LanguageRuTest.php M tests/phpunit/languages/SpecialPageAliasTest.php M tests/testHelpers.inc 47 files changed, 80 insertions(+), 89 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/98/119798/1 diff --git a/includes/MediaWikiVersionFetcher.php b/includes/MediaWikiVersionFetcher.php index 1d59ec3..17cb8aa 100644 --- a/includes/MediaWikiVersionFetcher.php +++ b/includes/MediaWikiVersionFetcher.php @@ -28,4 +28,4 @@ return $matches[1]; } -} \ No newline at end of file +} diff --git a/includes/QueryPage.php b/includes/QueryPage.php index b808408..69629e0 100644 --- a/includes/QueryPage.php +++ b/includes/QueryPage.php @@ -552,7 +552,7 @@ if ( $this-numRows 0 ) { $out-addHTML( $this-msg( 'showingresultsinrange' )-numParams( min( $this-numRows, $this-limit ), # do not show the one extra row, if exist - $this-offset + 1, (min( $this-numRows, $this-limit ) + $this-offset) )-parseAsBlock() ); + $this-offset + 1, ( min( $this-numRows, $this-limit ) + $this-offset ) )-parseAsBlock() ); # Disable the next link when we reach the end $paging = $this-getLanguage()-viewPrevNext( $this-getPageTitle( $par ), $this-offset, $this-limit, $this-linkParameters(), ( $this-numRows = $this-limit ) ); diff --git a/includes/Setup.php b/includes/Setup.php index 777ca37..1a7f21e 100644 --- a/includes/Setup.php +++ b/includes/Setup.php @@ -36,7 +36,7 @@ $fname = 'Setup.php'; wfProfileIn( $fname ); -wfProfileIn( $fname . '-defaults' ); +wfProfileIn( $fname . '-defaults' ); // Check to see if we are at the file scope if ( !isset( $wgVersion ) ) { @@ -396,7 +396,7 @@ ); } -wfProfileOut( $fname . '-defaults' ); +wfProfileOut( $fname . '-defaults' ); // Disable MWDebug for command line mode, this prevents MWDebug from eating up // all the memory from logging SQL queries on maintenance scripts diff --git a/includes/TimestampException.php b/includes/TimestampException.php index 18f58fd..4345a73 100644 --- a/includes/TimestampException.php +++ b/includes/TimestampException.php @@ -3,4 +3,4 @@ /** * @since 1.20 */ -class TimestampException extends MWException {} \ No newline at end of file +class TimestampException extends MWException {} diff --git a/includes/TitleArrayFromResult.php b/includes/TitleArrayFromResult.php index f900538..b4a553f 100644 --- a/includes/TitleArrayFromResult.php +++
[MediaWiki-commits] [Gerrit] Fixed spacing - change (mediawiki/core)
jenkins-bot has submitted this change and it was merged. Change subject: Fixed spacing .. Fixed spacing - Added spaces after if/foreach/catch - Added new line before end of file - Added or removed spaces before/after parenthesis, comma - Added spaces around string concat Change-Id: I0590070f1b3542108e242730e8d9a3ba9831e94f --- M includes/MediaWikiVersionFetcher.php M includes/QueryPage.php M includes/Setup.php M includes/TimestampException.php M includes/TitleArrayFromResult.php M includes/User.php M includes/UserArray.php M includes/composer/ComposerVersionNormalizer.php M includes/db/DatabaseMssql.php M includes/db/DatabaseMysqli.php M includes/diff/DairikiDiff.php M includes/filebackend/SwiftFileBackend.php M includes/installer/MssqlInstaller.php M includes/objectcache/MemcachedClient.php M includes/parser/CoreParserFunctions.php M includes/profiler/ProfilerMwprof.php M includes/resourceloader/ResourceLoaderStartUpModule.php M includes/specials/SpecialChangePassword.php M includes/specials/SpecialUserrights.php M includes/specials/SpecialVersion.php M includes/specials/SpecialWatchlist.php M includes/upload/UploadBase.php M languages/classes/LanguageUz.php M languages/utils/CLDRPluralRuleEvaluator.php M maintenance/generateJsonI18n.php M skins/CologneBlue.php M skins/Vector.php M tests/parser/parserTest.inc M tests/phpunit/MediaWikiTestCase.php M tests/phpunit/includes/MWTimestampTest.php M tests/phpunit/includes/MediaWikiVersionFetcherTest.php M tests/phpunit/includes/MessageTest.php M tests/phpunit/includes/StatusTest.php M tests/phpunit/includes/TitleArrayFromResultTest.php M tests/phpunit/includes/UserArrayFromResultTest.php M tests/phpunit/includes/composer/ComposerVersionNormalizerTest.php M tests/phpunit/includes/diff/ArrayDiffFormatterTest.php M tests/phpunit/includes/diff/DiffOpTest.php M tests/phpunit/includes/exception/BadTitleErrorTest.php M tests/phpunit/includes/exception/ErrorPageErrorTest.php M tests/phpunit/includes/exception/MWExceptionTest.php M tests/phpunit/includes/exception/ReadOnlyErrorTest.php M tests/phpunit/includes/exception/ThrottledErrorTest.php M tests/phpunit/includes/site/SiteListTest.php M tests/phpunit/languages/LanguageRuTest.php M tests/phpunit/languages/SpecialPageAliasTest.php M tests/testHelpers.inc 47 files changed, 80 insertions(+), 89 deletions(-) Approvals: Siebrand: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/MediaWikiVersionFetcher.php b/includes/MediaWikiVersionFetcher.php index 1d59ec3..17cb8aa 100644 --- a/includes/MediaWikiVersionFetcher.php +++ b/includes/MediaWikiVersionFetcher.php @@ -28,4 +28,4 @@ return $matches[1]; } -} \ No newline at end of file +} diff --git a/includes/QueryPage.php b/includes/QueryPage.php index b808408..69629e0 100644 --- a/includes/QueryPage.php +++ b/includes/QueryPage.php @@ -552,7 +552,7 @@ if ( $this-numRows 0 ) { $out-addHTML( $this-msg( 'showingresultsinrange' )-numParams( min( $this-numRows, $this-limit ), # do not show the one extra row, if exist - $this-offset + 1, (min( $this-numRows, $this-limit ) + $this-offset) )-parseAsBlock() ); + $this-offset + 1, ( min( $this-numRows, $this-limit ) + $this-offset ) )-parseAsBlock() ); # Disable the next link when we reach the end $paging = $this-getLanguage()-viewPrevNext( $this-getPageTitle( $par ), $this-offset, $this-limit, $this-linkParameters(), ( $this-numRows = $this-limit ) ); diff --git a/includes/Setup.php b/includes/Setup.php index 777ca37..1a7f21e 100644 --- a/includes/Setup.php +++ b/includes/Setup.php @@ -36,7 +36,7 @@ $fname = 'Setup.php'; wfProfileIn( $fname ); -wfProfileIn( $fname . '-defaults' ); +wfProfileIn( $fname . '-defaults' ); // Check to see if we are at the file scope if ( !isset( $wgVersion ) ) { @@ -396,7 +396,7 @@ ); } -wfProfileOut( $fname . '-defaults' ); +wfProfileOut( $fname . '-defaults' ); // Disable MWDebug for command line mode, this prevents MWDebug from eating up // all the memory from logging SQL queries on maintenance scripts diff --git a/includes/TimestampException.php b/includes/TimestampException.php index 18f58fd..4345a73 100644 --- a/includes/TimestampException.php +++ b/includes/TimestampException.php @@ -3,4 +3,4 @@ /** * @since 1.20 */ -class TimestampException extends MWException {} \ No newline at end of file +class TimestampException extends MWException {} diff --git a/includes/TitleArrayFromResult.php b/includes/TitleArrayFromResult.php index f900538..b4a553f 100644 --- a/includes/TitleArrayFromResult.php +++ b/includes/TitleArrayFromResult.php @@ -83,4 +83,4 @@ function
[MediaWiki-commits] [Gerrit] fixed spacing - change (mediawiki/core)
Cargan has uploaded a new change for review. https://gerrit.wikimedia.org/r/106225 Change subject: fixed spacing .. fixed spacing Change-Id: I484c618c6d160e130bd9caaf911f60db7b394658 --- M includes/Title.php 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/25/106225/1 diff --git a/includes/Title.php b/includes/Title.php index efcc491..7552e0a 100644 --- a/includes/Title.php +++ b/includes/Title.php @@ -1894,7 +1894,7 @@ $errors[] = array( 'cant-move-to-user-page' ); } } elseif ( $action == 'edit' $user-isAnon() !$user-isAllowed( 'edit' ) ) { - $errors[] = array( 'noarticletext-nopermission'); + $errors[] = array( 'noarticletext-nopermission' ); $errors[] = $this-missingPermissionError( $action, $short ); } elseif ( !$user-isAllowed( $action ) ) { $errors[] = $this-missingPermissionError( $action, $short ); -- To view, visit https://gerrit.wikimedia.org/r/106225 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I484c618c6d160e130bd9caaf911f60db7b394658 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Cargan zie...@gmail.com ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Fixed spacing - change (mediawiki/core)
Umherirrender has uploaded a new change for review. https://gerrit.wikimedia.org/r/101680 Change subject: Fixed spacing .. Fixed spacing - Removed double spaces in arrays - Added space after for - Added spaces around string concat Change-Id: Ifbcaf35f9bfef1f97226a38b5bd74c237f61c99e --- M includes/DefaultSettings.php M includes/HttpFunctions.php M includes/Title.php M includes/media/MediaHandler.php M languages/classes/LanguageIu.php M languages/classes/LanguageSr.php M tests/phpunit/includes/StatusTest.php M tests/phpunit/includes/media/DjVuTest.php 8 files changed, 65 insertions(+), 64 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/80/101680/1 diff --git a/includes/DefaultSettings.php b/includes/DefaultSettings.php index a79bc41..b1265c1 100644 --- a/includes/DefaultSettings.php +++ b/includes/DefaultSettings.php @@ -937,8 +937,8 @@ 'ImageMagick' = '$path/convert -background white -thumbnail $widthx$height\! $input PNG:$output', 'sodipodi' = '$path/sodipodi -z -w $width -f $input -e $output', 'inkscape' = '$path/inkscape -z -w $width -f $input -e $output', - 'batik' = 'java -Djava.awt.headless=true -jar $path/batik-rasterizer.jar -w $width -d '. - '$output $input', + 'batik' = 'java -Djava.awt.headless=true -jar $path/batik-rasterizer.jar -w $width -d ' + . '$output $input', 'rsvg' = '$path/rsvg -w $width -h $height $input $output', 'imgserv' = '$path/imgserv-wrapper -i svg -o png -w$width $input $output', 'ImagickExt' = array( 'SvgHandler::rasterizeImagickExt' ), diff --git a/includes/HttpFunctions.php b/includes/HttpFunctions.php index f2e69b8..9093c83 100644 --- a/includes/HttpFunctions.php +++ b/includes/HttpFunctions.php @@ -295,10 +295,11 @@ return new CurlHttpRequest( $url, $options ); case 'php': if ( !wfIniGetBool( 'allow_url_fopen' ) ) { - throw new MWException( __METHOD__ . ': allow_url_fopen '. - 'needs to be enabled for pure PHP http requests to '. - 'work. If possible, curl should be used instead. See '. - 'http://php.net/curl.' ); + throw new MWException( __METHOD__ . ': allow_url_fopen ' . + 'needs to be enabled for pure PHP http requests to ' . + 'work. If possible, curl should be used instead. See ' . + 'http://php.net/curl.' + ); } return new PhpHttpRequest( $url, $options ); default: diff --git a/includes/Title.php b/includes/Title.php index 924027e..1d13f4b 100644 --- a/includes/Title.php +++ b/includes/Title.php @@ -79,8 +79,8 @@ var $mTitleProtection;/// Cached value for getTitleProtection (create protection) # Don't change the following default, NS_MAIN is hardcoded in several # places. See bug 696. + # Zero except in {{transclusion}} tags var $mDefaultNamespace = NS_MAIN; // / Namespace index when there is no namespace - # Zero except in {{transclusion}} tags var $mWatched = null; // / Is $wgUser watching this page? null if unfilled, accessed through userIsWatching() var $mLength = -1;// / The page length, 0 for special pages var $mRedirect = null;// / Is the article at this title a redirect? diff --git a/includes/media/MediaHandler.php b/includes/media/MediaHandler.php index 8ad593b..ee11599 100644 --- a/includes/media/MediaHandler.php +++ b/includes/media/MediaHandler.php @@ -445,7 +445,7 @@ return $this-getPageText( $file, 1 ); } $document = ''; - for( $i = 1; $i = $numPages; $i++ ) { + for ( $i = 1; $i = $numPages; $i++ ) { $curPage = $this-getPageText( $file, $i ); if ( is_string( $curPage ) ) { $document .= $curPage . \n; diff --git a/languages/classes/LanguageIu.php b/languages/classes/LanguageIu.php index abd2e7c..a46eafb 100644 --- a/languages/classes/LanguageIu.php +++ b/languages/classes/LanguageIu.php @@ -39,23 +39,23 @@ protected $mDoContentConvert; public $mToLatin = array( - 'ᐦ' = 'h', 'ᐃ' = 'i','ᐄ' = 'ii','ᐅ' = 'u','ᐆ' = 'uu','ᐊ' = 'a','ᐋ' = 'aa', - 'ᑉ' = 'p', 'ᐱ' = 'pi', 'ᐲ' =
[MediaWiki-commits] [Gerrit] Fixed spacing - change (mediawiki/core)
Brian Wolff has submitted this change and it was merged. Change subject: Fixed spacing .. Fixed spacing - Removed double spaces in arrays - Added space after for - Added spaces around string concat Change-Id: Ifbcaf35f9bfef1f97226a38b5bd74c237f61c99e --- M includes/DefaultSettings.php M includes/HttpFunctions.php M includes/Title.php M includes/media/MediaHandler.php M languages/classes/LanguageIu.php M languages/classes/LanguageSr.php M tests/phpunit/includes/StatusTest.php M tests/phpunit/includes/media/DjVuTest.php 8 files changed, 65 insertions(+), 64 deletions(-) Approvals: Brian Wolff: Looks good to me, approved diff --git a/includes/DefaultSettings.php b/includes/DefaultSettings.php index a79bc41..b1265c1 100644 --- a/includes/DefaultSettings.php +++ b/includes/DefaultSettings.php @@ -937,8 +937,8 @@ 'ImageMagick' = '$path/convert -background white -thumbnail $widthx$height\! $input PNG:$output', 'sodipodi' = '$path/sodipodi -z -w $width -f $input -e $output', 'inkscape' = '$path/inkscape -z -w $width -f $input -e $output', - 'batik' = 'java -Djava.awt.headless=true -jar $path/batik-rasterizer.jar -w $width -d '. - '$output $input', + 'batik' = 'java -Djava.awt.headless=true -jar $path/batik-rasterizer.jar -w $width -d ' + . '$output $input', 'rsvg' = '$path/rsvg -w $width -h $height $input $output', 'imgserv' = '$path/imgserv-wrapper -i svg -o png -w$width $input $output', 'ImagickExt' = array( 'SvgHandler::rasterizeImagickExt' ), diff --git a/includes/HttpFunctions.php b/includes/HttpFunctions.php index f2e69b8..9093c83 100644 --- a/includes/HttpFunctions.php +++ b/includes/HttpFunctions.php @@ -295,10 +295,11 @@ return new CurlHttpRequest( $url, $options ); case 'php': if ( !wfIniGetBool( 'allow_url_fopen' ) ) { - throw new MWException( __METHOD__ . ': allow_url_fopen '. - 'needs to be enabled for pure PHP http requests to '. - 'work. If possible, curl should be used instead. See '. - 'http://php.net/curl.' ); + throw new MWException( __METHOD__ . ': allow_url_fopen ' . + 'needs to be enabled for pure PHP http requests to ' . + 'work. If possible, curl should be used instead. See ' . + 'http://php.net/curl.' + ); } return new PhpHttpRequest( $url, $options ); default: diff --git a/includes/Title.php b/includes/Title.php index 924027e..1d13f4b 100644 --- a/includes/Title.php +++ b/includes/Title.php @@ -79,8 +79,8 @@ var $mTitleProtection;/// Cached value for getTitleProtection (create protection) # Don't change the following default, NS_MAIN is hardcoded in several # places. See bug 696. + # Zero except in {{transclusion}} tags var $mDefaultNamespace = NS_MAIN; // / Namespace index when there is no namespace - # Zero except in {{transclusion}} tags var $mWatched = null; // / Is $wgUser watching this page? null if unfilled, accessed through userIsWatching() var $mLength = -1;// / The page length, 0 for special pages var $mRedirect = null;// / Is the article at this title a redirect? diff --git a/includes/media/MediaHandler.php b/includes/media/MediaHandler.php index 8ad593b..ee11599 100644 --- a/includes/media/MediaHandler.php +++ b/includes/media/MediaHandler.php @@ -445,7 +445,7 @@ return $this-getPageText( $file, 1 ); } $document = ''; - for( $i = 1; $i = $numPages; $i++ ) { + for ( $i = 1; $i = $numPages; $i++ ) { $curPage = $this-getPageText( $file, $i ); if ( is_string( $curPage ) ) { $document .= $curPage . \n; diff --git a/languages/classes/LanguageIu.php b/languages/classes/LanguageIu.php index abd2e7c..a46eafb 100644 --- a/languages/classes/LanguageIu.php +++ b/languages/classes/LanguageIu.php @@ -39,23 +39,23 @@ protected $mDoContentConvert; public $mToLatin = array( - 'ᐦ' = 'h', 'ᐃ' = 'i','ᐄ' = 'ii','ᐅ' = 'u','ᐆ' = 'uu','ᐊ' = 'a','ᐋ' = 'aa', - 'ᑉ' = 'p', 'ᐱ' = 'pi', 'ᐲ' = 'pii', 'ᐳ' = 'pu', 'ᐴ' = 'puu', 'ᐸ' = 'pa', 'ᐹ' = 'paa', -
[MediaWiki-commits] [Gerrit] Fixed spacing - change (mediawiki/core)
Umherirrender has uploaded a new change for review. https://gerrit.wikimedia.org/r/100220 Change subject: Fixed spacing .. Fixed spacing - Added space after foreach - Added/Removed spaces inside arrays Change-Id: Ia8775824fa33976b1a4dab43e07f1bff0c57479c --- M includes/GlobalFunctions.php M includes/ImagePage.php M includes/WikiPage.php M includes/installer/PostgresUpdater.php M includes/media/SVG.php M includes/media/SVGMetadataExtractor.php M tests/phpunit/includes/ExceptionTest.php M tests/phpunit/includes/api/ApiBaseTest.php M tests/phpunit/includes/api/ApiWatchTest.php 9 files changed, 17 insertions(+), 16 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/20/100220/1 diff --git a/includes/GlobalFunctions.php b/includes/GlobalFunctions.php index 819b076..5a1ef6c 100644 --- a/includes/GlobalFunctions.php +++ b/includes/GlobalFunctions.php @@ -3375,8 +3375,8 @@ 28 = 's', 29 = 't', 30 = 'u', 31 = 'v', 32 = 'w', 33 = 'x', 34 = 'y', 35 = 'z', - '0' = 0, '1' = 1, '2' = 2, '3' = 3, '4' = 4, '5' = 5, - '6' = 6, '7' = 7, '8' = 8, '9' = 9, 'a' = 10, 'b' = 11, + '0' = 0, '1' = 1, '2' = 2, '3' = 3, '4' = 4, '5' = 5, + '6' = 6, '7' = 7, '8' = 8, '9' = 9, 'a' = 10, 'b' = 11, 'c' = 12, 'd' = 13, 'e' = 14, 'f' = 15, 'g' = 16, 'h' = 17, 'i' = 18, 'j' = 19, 'k' = 20, 'l' = 21, 'm' = 22, 'n' = 23, 'o' = 24, 'p' = 25, 'q' = 26, 'r' = 27, 's' = 28, 't' = 29, diff --git a/includes/ImagePage.php b/includes/ImagePage.php index 2c303c9..93cef53 100644 --- a/includes/ImagePage.php +++ b/includes/ImagePage.php @@ -1009,7 +1009,7 @@ } else { $display = $curLang; } - $opts = XML::Option( $display, $curLang, true ) . $opts; + $opts = XML::Option( $display, $curLang, true ) . $opts; } $select = Html::rawElement( 'select', array( 'id' = 'mw-imglangselector', 'name' = 'lang' ), $opts ); diff --git a/includes/WikiPage.php b/includes/WikiPage.php index 9507e5f..f8277e0 100644 --- a/includes/WikiPage.php +++ b/includes/WikiPage.php @@ -1660,7 +1660,8 @@ * @since 1.21 */ public function doEditContent( Content $content, $summary, $flags = 0, $baseRevId = false, - User $user = null, $serialisation_format = null ) { + User $user = null, $serialisation_format = null + ) { global $wgUser, $wgUseAutomaticEditSummaries, $wgUseRCPatrol, $wgUseNPPatrol; // Low-level sanity check diff --git a/includes/installer/PostgresUpdater.php b/includes/installer/PostgresUpdater.php index e8a1c80..3ecb79b 100644 --- a/includes/installer/PostgresUpdater.php +++ b/includes/installer/PostgresUpdater.php @@ -399,7 +399,7 @@ array( 'tsearchFixes' ), // 1.23 - array( 'addPgField', 'recentchanges', 'rc_source', TEXT NOT NULL DEFAULT '' ), + array( 'addPgField', 'recentchanges', 'rc_source', TEXT NOT NULL DEFAULT '' ), ); } diff --git a/includes/media/SVG.php b/includes/media/SVG.php index 17891fc..b15d57b 100644 --- a/includes/media/SVG.php +++ b/includes/media/SVG.php @@ -94,7 +94,7 @@ if ( $metadata ) { $metadata = $this-unpackMetadata( $metadata ); if ( isset( $metadata['translations'] ) ) { - foreach( $metadata['translations'] as $lang = $langType ) { + foreach ( $metadata['translations'] as $lang = $langType ) { if ( $langType === SvgReader::LANG_FULL_MATCH ) { $langList[] = $lang; } diff --git a/includes/media/SVGMetadataExtractor.php b/includes/media/SVGMetadataExtractor.php index 3f0edb3..361eb94 100644 --- a/includes/media/SVGMetadataExtractor.php +++ b/includes/media/SVGMetadataExtractor.php @@ -267,7 +267,7 @@ if ( !is_null( $sysLang ) $sysLang !== '' ) { // See http://www.w3.org/TR/SVG/struct.html#SystemLanguageAttribute $langList = explode( ',', $sysLang ); - foreach( $langList as $langItem ) { + foreach ( $langList as $langItem ) { $langItem = trim( $langItem ); if ( Language::isWellFormedLanguageTag( $langItem ) ) {
[MediaWiki-commits] [Gerrit] Fixed spacing - change (mediawiki/core)
jenkins-bot has submitted this change and it was merged. Change subject: Fixed spacing .. Fixed spacing - Added space after foreach - Added/Removed spaces inside arrays Change-Id: Ia8775824fa33976b1a4dab43e07f1bff0c57479c --- M includes/GlobalFunctions.php M includes/ImagePage.php M includes/WikiPage.php M includes/installer/PostgresUpdater.php M includes/media/SVG.php M includes/media/SVGMetadataExtractor.php M tests/phpunit/includes/ExceptionTest.php M tests/phpunit/includes/api/ApiBaseTest.php M tests/phpunit/includes/api/ApiWatchTest.php 9 files changed, 17 insertions(+), 16 deletions(-) Approvals: Bartosz Dziewoński: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/GlobalFunctions.php b/includes/GlobalFunctions.php index 819b076..5a1ef6c 100644 --- a/includes/GlobalFunctions.php +++ b/includes/GlobalFunctions.php @@ -3375,8 +3375,8 @@ 28 = 's', 29 = 't', 30 = 'u', 31 = 'v', 32 = 'w', 33 = 'x', 34 = 'y', 35 = 'z', - '0' = 0, '1' = 1, '2' = 2, '3' = 3, '4' = 4, '5' = 5, - '6' = 6, '7' = 7, '8' = 8, '9' = 9, 'a' = 10, 'b' = 11, + '0' = 0, '1' = 1, '2' = 2, '3' = 3, '4' = 4, '5' = 5, + '6' = 6, '7' = 7, '8' = 8, '9' = 9, 'a' = 10, 'b' = 11, 'c' = 12, 'd' = 13, 'e' = 14, 'f' = 15, 'g' = 16, 'h' = 17, 'i' = 18, 'j' = 19, 'k' = 20, 'l' = 21, 'm' = 22, 'n' = 23, 'o' = 24, 'p' = 25, 'q' = 26, 'r' = 27, 's' = 28, 't' = 29, diff --git a/includes/ImagePage.php b/includes/ImagePage.php index 2c303c9..93cef53 100644 --- a/includes/ImagePage.php +++ b/includes/ImagePage.php @@ -1009,7 +1009,7 @@ } else { $display = $curLang; } - $opts = XML::Option( $display, $curLang, true ) . $opts; + $opts = XML::Option( $display, $curLang, true ) . $opts; } $select = Html::rawElement( 'select', array( 'id' = 'mw-imglangselector', 'name' = 'lang' ), $opts ); diff --git a/includes/WikiPage.php b/includes/WikiPage.php index 9507e5f..f8277e0 100644 --- a/includes/WikiPage.php +++ b/includes/WikiPage.php @@ -1660,7 +1660,8 @@ * @since 1.21 */ public function doEditContent( Content $content, $summary, $flags = 0, $baseRevId = false, - User $user = null, $serialisation_format = null ) { + User $user = null, $serialisation_format = null + ) { global $wgUser, $wgUseAutomaticEditSummaries, $wgUseRCPatrol, $wgUseNPPatrol; // Low-level sanity check diff --git a/includes/installer/PostgresUpdater.php b/includes/installer/PostgresUpdater.php index e8a1c80..3ecb79b 100644 --- a/includes/installer/PostgresUpdater.php +++ b/includes/installer/PostgresUpdater.php @@ -399,7 +399,7 @@ array( 'tsearchFixes' ), // 1.23 - array( 'addPgField', 'recentchanges', 'rc_source', TEXT NOT NULL DEFAULT '' ), + array( 'addPgField', 'recentchanges', 'rc_source', TEXT NOT NULL DEFAULT '' ), ); } diff --git a/includes/media/SVG.php b/includes/media/SVG.php index 17891fc..b15d57b 100644 --- a/includes/media/SVG.php +++ b/includes/media/SVG.php @@ -94,7 +94,7 @@ if ( $metadata ) { $metadata = $this-unpackMetadata( $metadata ); if ( isset( $metadata['translations'] ) ) { - foreach( $metadata['translations'] as $lang = $langType ) { + foreach ( $metadata['translations'] as $lang = $langType ) { if ( $langType === SvgReader::LANG_FULL_MATCH ) { $langList[] = $lang; } diff --git a/includes/media/SVGMetadataExtractor.php b/includes/media/SVGMetadataExtractor.php index 3f0edb3..361eb94 100644 --- a/includes/media/SVGMetadataExtractor.php +++ b/includes/media/SVGMetadataExtractor.php @@ -267,7 +267,7 @@ if ( !is_null( $sysLang ) $sysLang !== '' ) { // See http://www.w3.org/TR/SVG/struct.html#SystemLanguageAttribute $langList = explode( ',', $sysLang ); - foreach( $langList as $langItem ) { + foreach ( $langList as $langItem ) { $langItem = trim( $langItem ); if ( Language::isWellFormedLanguageTag( $langItem ) ) {
[MediaWiki-commits] [Gerrit] Fixed spacing - change (mediawiki/core)
jenkins-bot has submitted this change and it was merged. Change subject: Fixed spacing .. Fixed spacing - Place commas correct - Moved comments - Add space after if/foreach/catch - Reformat some conditions - Removed trailing spaces/tabs Change-Id: I40ccda72c418c4a33fcd675773cb08d971510cdb --- M includes/Cookie.php M includes/Exception.php M includes/Export.php M includes/GitInfo.php M includes/HTMLForm.php M includes/Html.php M includes/HttpFunctions.php M includes/LinkFilter.php M includes/Linker.php M includes/Revision.php M includes/User.php M includes/Xml.php M includes/cache/LocalisationCache.php M includes/db/Database.php M includes/media/FormatMetadata.php M includes/media/XCF.php M includes/parser/Parser.php M includes/specials/SpecialExpandTemplates.php M includes/templates/NoLocalSettings.php M languages/LanguageConverter.php M languages/classes/LanguageDsb.php M languages/classes/LanguageHsb.php M maintenance/backupTextPass.inc M maintenance/cdb.php M maintenance/parse.php M maintenance/userDupes.inc M tests/phpunit/data/xmp/gps.result.php M tests/phpunit/includes/LinkFilterTest.php M tests/phpunit/includes/PreferencesTest.php M tests/phpunit/includes/StatusTest.php M tests/phpunit/includes/api/query/ApiQueryContinueTestBase.php M tests/phpunit/includes/jobqueue/RefreshLinksPartitionTest.php M tests/phpunit/includes/specials/SpecialSearchTest.php 33 files changed, 169 insertions(+), 162 deletions(-) Approvals: Parent5446: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/Cookie.php b/includes/Cookie.php index ecf4667..e0a11a2 100644 --- a/includes/Cookie.php +++ b/includes/Cookie.php @@ -131,8 +131,14 @@ } if ( substr( $domain, 0, 1 ) == '.' -substr_compare( $originDomain, $domain, -strlen( $domain ), - strlen( $domain ), true ) != 0 ) { +substr_compare( + $originDomain, + $domain, + -strlen( $domain ), + strlen( $domain ), + true + ) != 0 + ) { return false; } } @@ -167,8 +173,15 @@ if ( $domain == $this-domain || ( strlen( $domain ) strlen( $this-domain ) substr( $this-domain, 0, 1 ) == '.' -substr_compare( $domain, $this-domain, -strlen( $this-domain ), - strlen( $this-domain ), true ) == 0 ) ) { +substr_compare( + $domain, + $this-domain, + -strlen( $this-domain ), + strlen( $this-domain ), + true + ) == 0 + ) + ) { return true; } diff --git a/includes/Exception.php b/includes/Exception.php index 008be15..4548345 100644 --- a/includes/Exception.php +++ b/includes/Exception.php @@ -619,9 +619,9 @@ if ( $wgShowExceptionDetails ) { $message .= 'Original exception: ' . self::getLogMessage( $e ) . -\nBacktrace:\n . self::getRedactedTraceAsString( $e ) . -\n\nException caught inside exception handler: . self::getLogMessage( $e2 ) . -\nBacktrace:\n . self::getRedactedTraceAsString( $e2 ); + \nBacktrace:\n . self::getRedactedTraceAsString( $e ) . + \n\nException caught inside exception handler: . self::getLogMessage( $e2 ) . + \nBacktrace:\n . self::getRedactedTraceAsString( $e2 ); } else { $message .= Exception caught inside exception handler.\n\n . Set \$wgShowExceptionDetails = true; at the bottom of LocalSettings.php . diff --git a/includes/Export.php b/includes/Export.php index 3d34763..b4a507d 100644 --- a/includes/Export.php +++ b/includes/Export.php @@ -503,7 +503,8 @@ 'xmlns' = http://www.mediawiki.org/xml/export-$ver/;, 'xmlns:xsi' =
[MediaWiki-commits] [Gerrit] Fixed spacing - change (mediawiki/core)
Umherirrender has uploaded a new change for review. https://gerrit.wikimedia.org/r/98120 Change subject: Fixed spacing .. Fixed spacing - Place commas correct - Moved comments - Add space after if/foreach/catch - Reformat some conditions - Removed trailing spaces Change-Id: I40ccda72c418c4a33fcd675773cb08d971510cdb --- M includes/Cookie.php M includes/Exception.php M includes/Export.php M includes/GitInfo.php M includes/HTMLForm.php M includes/Html.php M includes/HttpFunctions.php M includes/Linker.php M includes/User.php M includes/Xml.php M includes/cache/LocalisationCache.php M includes/db/Database.php M includes/media/FormatMetadata.php M includes/media/XCF.php M includes/parser/Parser.php M includes/specials/SpecialExpandTemplates.php M includes/templates/NoLocalSettings.php M languages/LanguageConverter.php M languages/classes/LanguageDsb.php M languages/classes/LanguageHsb.php M maintenance/backupTextPass.inc M maintenance/cdb.php M maintenance/parse.php M maintenance/userDupes.inc M tests/phpunit/data/xmp/gps.result.php M tests/phpunit/includes/PreferencesTest.php M tests/phpunit/includes/StatusTest.php M tests/phpunit/includes/api/query/ApiQueryContinueTestBase.php M tests/phpunit/includes/jobqueue/RefreshLinksPartitionTest.php M tests/phpunit/includes/specials/SpecialSearchTest.php 30 files changed, 118 insertions(+), 127 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/20/98120/1 diff --git a/includes/Cookie.php b/includes/Cookie.php index ecf4667..84050ba 100644 --- a/includes/Cookie.php +++ b/includes/Cookie.php @@ -132,7 +132,7 @@ if ( substr( $domain, 0, 1 ) == '.' substr_compare( $originDomain, $domain, -strlen( $domain ), - strlen( $domain ), true ) != 0 ) { + strlen( $domain ), true ) != 0 ) { return false; } } diff --git a/includes/Exception.php b/includes/Exception.php index 008be15..4548345 100644 --- a/includes/Exception.php +++ b/includes/Exception.php @@ -619,9 +619,9 @@ if ( $wgShowExceptionDetails ) { $message .= 'Original exception: ' . self::getLogMessage( $e ) . -\nBacktrace:\n . self::getRedactedTraceAsString( $e ) . -\n\nException caught inside exception handler: . self::getLogMessage( $e2 ) . -\nBacktrace:\n . self::getRedactedTraceAsString( $e2 ); + \nBacktrace:\n . self::getRedactedTraceAsString( $e ) . + \n\nException caught inside exception handler: . self::getLogMessage( $e2 ) . + \nBacktrace:\n . self::getRedactedTraceAsString( $e2 ); } else { $message .= Exception caught inside exception handler.\n\n . Set \$wgShowExceptionDetails = true; at the bottom of LocalSettings.php . diff --git a/includes/Export.php b/includes/Export.php index 3d34763..b4a507d 100644 --- a/includes/Export.php +++ b/includes/Export.php @@ -503,7 +503,8 @@ 'xmlns' = http://www.mediawiki.org/xml/export-$ver/;, 'xmlns:xsi' = http://www.w3.org/2001/XMLSchema-instance;, 'xsi:schemaLocation' = http://www.mediawiki.org/xml/export-$ver/ . - http://www.mediawiki.org/xml/export-$ver.xsd;, #TODO: how do we get a new version up there? + #TODO: how do we get a new version up there? + http://www.mediawiki.org/xml/export-$ver.xsd;, 'version'= $ver, 'xml:lang' = $wgLanguageCode ), null ) . diff --git a/includes/GitInfo.php b/includes/GitInfo.php index f49f9be..e0bd5cd 100644 --- a/includes/GitInfo.php +++ b/includes/GitInfo.php @@ -143,8 +143,7 @@ } else { return (int)$commitDate; } - -} + } /** * Return the name of the current branch, or HEAD if not found diff --git a/includes/HTMLForm.php b/includes/HTMLForm.php index 1680fd6..385663a 100644 --- a/includes/HTMLForm.php +++ b/includes/HTMLForm.php @@ -655,8 +655,7 @@ . $this-getBody() . $this-getHiddenFields() . $this-getButtons() - . $this-mFooter -
[MediaWiki-commits] [Gerrit] Fixed spacing - change (mediawiki/core)
Umherirrender has uploaded a new change for review. https://gerrit.wikimedia.org/r/96509 Change subject: Fixed spacing .. Fixed spacing - Removed trailing spaces in comments - Removed multiple empty lines - Added space around parenthesis and changed TRUE - true Change-Id: I9fd3256ab490c7cd2034de3fd94e6be6e6d6d8f2 --- M includes/Block.php M includes/DefaultSettings.php M includes/GlobalFunctions.php M includes/HTMLForm.php M includes/Setup.php M includes/SpecialPage.php M includes/db/DatabaseMysqlBase.php M includes/filebackend/FileOp.php M includes/filerepo/FileRepo.php M includes/filerepo/file/LocalFile.php M includes/gallery/TraditionalImageGallery.php M includes/installer/WebInstallerOutput.php M includes/job/jobs/PublishStashedFileJob.php M includes/media/Bitmap.php M includes/media/ImageHandler.php M includes/parser/Preprocessor_DOM.php M includes/profiler/ProfilerSimpleUDP.php M includes/resourceloader/ResourceLoader.php M includes/revisiondelete/RevisionDeleter.php M includes/specials/SpecialImport.php M includes/specials/SpecialRandomInCategory.php M includes/upload/UploadBase.php M languages/classes/LanguageBs.php M languages/classes/LanguageOs.php M languages/classes/LanguageTr.php M maintenance/Maintenance.php M maintenance/backupTextPass.inc M maintenance/dumpTextPass.php M maintenance/generateSitemap.php M maintenance/moveBatch.php M maintenance/reassignEdits.php M maintenance/refreshImageMetadata.php M maintenance/runBatchedQuery.php M maintenance/showCacheStats.php M maintenance/storage/checkStorage.php M maintenance/storage/testCompression.php M maintenance/storage/trackBlobs.php M maintenance/userOptions.inc M skins/CologneBlue.php M skins/MonoBook.php M tests/phpunit/MediaWikiPHPUnitCommand.php M tests/phpunit/includes/EditPageTest.php M tests/phpunit/includes/ExceptionTest.php M tests/phpunit/includes/GlobalFunctions/GlobalTest.php M tests/phpunit/includes/PathRouterTest.php M tests/phpunit/includes/RevisionStorageTest.php M tests/phpunit/includes/RevisionStorageTest_ContentHandlerUseDB.php M tests/phpunit/includes/RevisionTest.php M tests/phpunit/includes/StatusTest.php M tests/phpunit/includes/WikiPageTest.php M tests/phpunit/includes/api/ApiUploadTest.php M tests/phpunit/includes/api/RandomImageGenerator.php M tests/phpunit/includes/db/DatabaseMysqlBaseTest.php M tests/phpunit/includes/debug/MWDebugTest.php M tests/phpunit/includes/media/ExifRotationTest.php M tests/phpunit/includes/media/ExifTest.php M tests/phpunit/includes/media/JpegMetadataExtractorTest.php M tests/phpunit/includes/media/JpegTest.php M tests/phpunit/includes/media/PNGMetadataExtractorTest.php M tests/phpunit/includes/upload/UploadBaseTest.php M tests/phpunit/includes/utils/ZipDirectoryReaderTest.php M tests/phpunit/languages/LanguageSrTest.php M tests/phpunit/languages/LanguageTest.php M tests/phpunit/languages/LanguageUzTest.php M tests/phpunit/maintenance/DumpTestCase.php M tests/phpunit/maintenance/MaintenanceTest.php M tests/phpunit/maintenance/backupPrefetchTest.php M tests/phpunit/maintenance/backupTextPassTest.php M tests/phpunit/maintenance/backup_LogTest.php M tests/phpunit/maintenance/backup_PageTest.php M tests/phpunit/maintenance/fetchTextTest.php M tests/phpunit/skins/SideBarTest.php M tests/phpunit/structure/ResourcesTest.php M tests/testHelpers.inc M thumb.php 75 files changed, 9 insertions(+), 121 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/09/96509/1 diff --git a/includes/Block.php b/includes/Block.php index 34b89e7..9aeb99b 100644 --- a/includes/Block.php +++ b/includes/Block.php @@ -1083,7 +1083,6 @@ return null; } - /** * Get all blocks that match any IP from an array of IP addresses * diff --git a/includes/DefaultSettings.php b/includes/DefaultSettings.php index fbf838c..8e7e76e 100644 --- a/includes/DefaultSettings.php +++ b/includes/DefaultSettings.php @@ -5037,7 +5037,7 @@ * Host for UDP profiler. * * The host should be running a daemon which can be obtained from MediaWiki - * Git at: + * Git at: * http://git.wikimedia.org/tree/operations%2Fsoftware.git/master/udpprofile */ $wgUDPProfilerHost = '127.0.0.1'; diff --git a/includes/GlobalFunctions.php b/includes/GlobalFunctions.php index 57877a2..ca0ca41 100644 --- a/includes/GlobalFunctions.php +++ b/includes/GlobalFunctions.php @@ -508,7 +508,6 @@ } } - // Analyze $serverUrl to obtain its protocol $bits = wfParseUrl( $serverUrl ); $serverHasProto = $bits $bits['scheme'] != ''; @@ -2773,9 +2772,9 @@ * @param array $limits optional array with limits(filesize, memory, time, walltime) * this overwrites the global wgShellMax* limits. * @param array $options Array of options: - *- duplicateStderr: Set this to true to duplicate stderr to stdout, + *- duplicateStderr: Set this to true
[MediaWiki-commits] [Gerrit] Fixed spacing - change (mediawiki/core)
jenkins-bot has submitted this change and it was merged. Change subject: Fixed spacing .. Fixed spacing - Removed double spaces - Added space after if/switch/foreach - Removed space on elseif - Added space around parentheses - Added newline at end of file - Removed space before semicolon at end of line Change-Id: Id40b87e04786c6111e6686d7f7eea1e588bdf37d --- M includes/Action.php M includes/GlobalFunctions.php M includes/HTMLForm.php M includes/Title.php M includes/api/ApiQuery.php M includes/db/DatabaseMysqlBase.php M includes/db/DatabaseMysqli.php M includes/filerepo/file/LocalFile.php M includes/installer/DatabaseUpdater.php M includes/media/FormatMetadata.php M includes/parser/ParserOutput.php M includes/resourceloader/ResourceLoaderFileModule.php M includes/specials/SpecialListfiles.php M includes/upload/UploadFromChunks.php M maintenance/benchmarks/bench_wfIsWindows.php M maintenance/mergeMessageFileList.php M maintenance/oracle/archives/patch_16_17_schema_changes.sql M maintenance/oracle/tables.sql M maintenance/purgeChangedFiles.php M maintenance/update.php M tests/phpunit/data/db/sqlite/tables-1.13.sql M tests/phpunit/includes/ExceptionTest.php M tests/phpunit/includes/FallbackTest.php M tests/phpunit/includes/MWExceptionHandlerTest.php M tests/phpunit/includes/StatusTest.php M tests/phpunit/includes/UserMailerTest.php M tests/phpunit/includes/XmlJsTest.php M tests/phpunit/includes/api/ApiEditPageTest.php M tests/phpunit/includes/api/ApiOptionsTest.php M tests/phpunit/includes/api/ApiTestContext.php M tests/phpunit/includes/api/MockApi.php M tests/phpunit/includes/api/UserWrapper.php M tests/phpunit/includes/db/DatabaseMysqlBaseTest.php M tests/phpunit/includes/db/DatabaseTest.php M tests/phpunit/includes/diff/DifferenceEngineTest.php M tests/phpunit/includes/media/FakeDimensionFile.php M tests/phpunit/includes/media/FormatMetadataTest.php M tests/phpunit/includes/parser/TidyTest.php M tests/phpunit/structure/AutoLoaderTest.php M tests/qunit/suites/resources/mediawiki/mediawiki.jqueryMsg.test.js 40 files changed, 84 insertions(+), 85 deletions(-) Approvals: Parent5446: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/Action.php b/includes/Action.php index 4b6e446..72be46f 100644 --- a/includes/Action.php +++ b/includes/Action.php @@ -167,7 +167,7 @@ final public function getContext() { if ( $this-context instanceof IContextSource ) { return $this-context; - } else if ( $this-page instanceof Article ) { + } elseif ( $this-page instanceof Article ) { // NOTE: $this-page can be a WikiPage, which does not have a context. wfDebug( __METHOD__ . ': no context known, falling back to Article\'s context.' ); return $this-page-getContext(); diff --git a/includes/GlobalFunctions.php b/includes/GlobalFunctions.php index 688300a..57877a2 100644 --- a/includes/GlobalFunctions.php +++ b/includes/GlobalFunctions.php @@ -3810,7 +3810,7 @@ * @param string|bool $cluster Cluster name accepted by LBFactory. Default: false. */ function wfWaitForSlaves( $maxLag = false, $wiki = false, $cluster = false ) { - if( $cluster !== false ) { + if ( $cluster !== false ) { $lb = wfGetLBFactory()-getExternalLB( $cluster ); } else { $lb = wfGetLB( $wiki ); diff --git a/includes/HTMLForm.php b/includes/HTMLForm.php index d260862..b60146a 100644 --- a/includes/HTMLForm.php +++ b/includes/HTMLForm.php @@ -1034,7 +1034,7 @@ $subsectionHtml = ''; $hasLabel = false; - switch( $displayFormat ) { + switch ( $displayFormat ) { case 'table': $getFieldHtmlMethod = 'getTableRow'; break; diff --git a/includes/Title.php b/includes/Title.php index 4b8a141..c726e9d 100644 --- a/includes/Title.php +++ b/includes/Title.php @@ -4830,7 +4830,7 @@ $langObj = wfGetLangObj( $contentHandler-getPageLanguage( $this ) ); $this-mPageLanguage = array( $langObj-getCode(), $wgLanguageCode ); } else { - $langObj = wfGetLangObj( $this-mPageLanguage[0] ); + $langObj = wfGetLangObj( $this-mPageLanguage[0] ); } wfProfileOut( __METHOD__ ); return $langObj; diff --git a/includes/api/ApiQuery.php b/includes/api/ApiQuery.php index 79a3b05..cec1ca8 100644 --- a/includes/api/ApiQuery.php +++ b/includes/api/ApiQuery.php @@ -714,7 +714,7 @@ 'meta' = 'Which metadata to get about the site. Module help is available below', 'indexpageids' = 'Include an additional pageids section listing all returned page IDs',
[MediaWiki-commits] [Gerrit] Fixed spacing - change (mediawiki/core)
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();
[MediaWiki-commits] [Gerrit] Fixed spacing - change (mediawiki/core)
jenkins-bot has submitted this change and it was merged. 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(-) Approvals: Demon: Looks good to me, approved jenkins-bot: Verified 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;