IAlex has uploaded a new change for review. https://gerrit.wikimedia.org/r/121928
Change subject: Add missing line breaks to wfDebug() calls ...................................................................... Add missing line breaks to wfDebug() calls Also removed true as second parameter to it from CloneDatabase.php since it is the default value of that parameter. Change-Id: I727ebae2bd4df0e26019985ce8c7ce73381c5642 --- M includes/Collation.php M includes/SkinTemplate.php M includes/WikiFilePage.php M includes/actions/Action.php M includes/api/ApiUpload.php M includes/cache/LocalisationCache.php M includes/clientpool/RedisConnectionPool.php M includes/db/CloneDatabase.php M includes/deferred/DataUpdate.php M includes/externalstore/ExternalStoreDB.php M includes/filerepo/file/File.php M includes/jobqueue/JobQueueDB.php M includes/parser/Parser.php M includes/specials/SpecialContributions.php M includes/specials/SpecialUpload.php M includes/specials/SpecialUploadStash.php M includes/specials/SpecialUserrights.php M languages/utils/CLDRPluralRuleEvaluator.php 18 files changed, 28 insertions(+), 25 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/28/121928/1 diff --git a/includes/Collation.php b/includes/Collation.php index d2a5797..987f3a7 100644 --- a/includes/Collation.php +++ b/includes/Collation.php @@ -470,7 +470,7 @@ $prev = $trimmedKey; } foreach ( $duplicatePrefixes as $badKey ) { - wfDebug( "Removing '{$letterMap[$badKey]}' from first letters." ); + wfDebug( "Removing '{$letterMap[$badKey]}' from first letters.\n" ); unset( $letterMap[$badKey] ); // This code assumes that unsetting does not change sort order. } diff --git a/includes/SkinTemplate.php b/includes/SkinTemplate.php index 32f0ed3..5073913 100644 --- a/includes/SkinTemplate.php +++ b/includes/SkinTemplate.php @@ -1202,7 +1202,8 @@ } if ( isset( $content_actions[$key] ) ) { - wfDebug( __METHOD__ . ": Found a duplicate key for $key while flattening content_navigation into content_actions." ); + wfDebug( __METHOD__ . ": Found a duplicate key for $key while flattening " . + "content_navigation into content_actions.\n" ); continue; } diff --git a/includes/WikiFilePage.php b/includes/WikiFilePage.php index 817f0fa..3e8a1ce 100644 --- a/includes/WikiFilePage.php +++ b/includes/WikiFilePage.php @@ -207,7 +207,7 @@ $file = $this->mFile; if ( ! $file instanceof LocalFile ) { - wfDebug( __CLASS__ . '::' . __METHOD__ . ' is not supported for this file' ); + wfDebug( __CLASS__ . '::' . __METHOD__ . " is not supported for this file\n" ); return TitleArray::newFromResult( new FakeResultWrapper( array() ) ); } diff --git a/includes/actions/Action.php b/includes/actions/Action.php index 1180c5e..07a5c24 100644 --- a/includes/actions/Action.php +++ b/includes/actions/Action.php @@ -169,7 +169,7 @@ return $this->context; } 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.' ); + wfDebug( __METHOD__ . ": no context known, falling back to Article's context.\n" ); return $this->page->getContext(); } diff --git a/includes/api/ApiUpload.php b/includes/api/ApiUpload.php index c54e8ba..30f8adb 100644 --- a/includes/api/ApiUpload.php +++ b/includes/api/ApiUpload.php @@ -92,7 +92,7 @@ } elseif ( $this->mParams['async'] && $this->mParams['filekey'] ) { // defer verification to background process } else { - wfDebug( __METHOD__ . 'about to verify' ); + wfDebug( __METHOD__ . " about to verify\n" ); $this->verifyUpload(); } diff --git a/includes/cache/LocalisationCache.php b/includes/cache/LocalisationCache.php index c56111f..8b78e8e 100644 --- a/includes/cache/LocalisationCache.php +++ b/includes/cache/LocalisationCache.php @@ -1281,7 +1281,7 @@ try { $this->readers[$code] = CdbReader::open( $fileName ); } catch ( CdbException $e ) { - wfDebug( __METHOD__ . ": unable to open cdb file for reading" ); + wfDebug( __METHOD__ . ": unable to open cdb file for reading\n" ); } } } @@ -1294,7 +1294,7 @@ $value = $this->readers[$code]->get( $key ); } catch ( CdbException $e ) { wfDebug( __METHOD__ . ": CdbException caught, error message was " - . $e->getMessage() ); + . $e->getMessage() . "\n" ); } if ( $value === false ) { return null; diff --git a/includes/clientpool/RedisConnectionPool.php b/includes/clientpool/RedisConnectionPool.php index 9e702e3..5db814d 100644 --- a/includes/clientpool/RedisConnectionPool.php +++ b/includes/clientpool/RedisConnectionPool.php @@ -127,7 +127,7 @@ // Initialize the object at the hash as needed... if ( !isset( self::$instances[$id] ) ) { self::$instances[$id] = new self( $options ); - wfDebug( "Creating a new " . __CLASS__ . " instance with id $id." ); + wfDebug( "Creating a new " . __CLASS__ . " instance with id $id.\n" ); } return self::$instances[$id]; @@ -153,7 +153,7 @@ } else { // Server is dead wfDebug( "server $server is marked down for another " . - ( $this->downServers[$server] - $now ) . " seconds, can't get connection" ); + ( $this->downServers[$server] - $now ) . " seconds, can't get connection\n" ); return false; } diff --git a/includes/db/CloneDatabase.php b/includes/db/CloneDatabase.php index 08e1885..536d721 100644 --- a/includes/db/CloneDatabase.php +++ b/includes/db/CloneDatabase.php @@ -86,12 +86,12 @@ && !in_array( $this->db->getType(), array( 'postgres', 'oracle' ) ) ) { $this->db->dropTable( $tbl, __METHOD__ ); - wfDebug( __METHOD__ . " dropping {$newTableName}\n", true ); + wfDebug( __METHOD__ . " dropping {$newTableName}\n" ); //Dropping the oldTable because the prefix was changed } # Create new table - wfDebug( __METHOD__ . " duplicating $oldTableName to $newTableName\n", true ); + wfDebug( __METHOD__ . " duplicating $oldTableName to $newTableName\n" ); $this->db->duplicateTableStructure( $oldTableName, $newTableName, $this->useTemporaryTables ); } } diff --git a/includes/deferred/DataUpdate.php b/includes/deferred/DataUpdate.php index 986a1f7..53990bf 100644 --- a/includes/deferred/DataUpdate.php +++ b/includes/deferred/DataUpdate.php @@ -108,7 +108,8 @@ } } catch ( Exception $ex ) { $exception = $ex; - wfDebug( "Caught exception, will rethrow after rollback: " . $ex->getMessage() ); + wfDebug( "Caught exception, will rethrow after rollback: " . + $ex->getMessage() . "\n" ); } // rollback remaining transactions diff --git a/includes/externalstore/ExternalStoreDB.php b/includes/externalstore/ExternalStoreDB.php index 5e7b323..9de81e0 100644 --- a/includes/externalstore/ExternalStoreDB.php +++ b/includes/externalstore/ExternalStoreDB.php @@ -128,10 +128,10 @@ $lb = $this->getLoadBalancer( $cluster ); if ( !in_array( "DB://" . $cluster, (array)$wgDefaultExternalStore ) ) { - wfDebug( "read only external store" ); + wfDebug( "read only external store\n" ); $lb->allowLagged( true ); } else { - wfDebug( "writable external store" ); + wfDebug( "writable external store\n" ); } return $lb->getConnection( DB_SLAVE, array(), $wiki ); diff --git a/includes/filerepo/file/File.php b/includes/filerepo/file/File.php index c19a51d..edf574f 100644 --- a/includes/filerepo/file/File.php +++ b/includes/filerepo/file/File.php @@ -980,7 +980,7 @@ if ( $this->repo ) { // Defer rendering if a 404 handler is set up... if ( $this->repo->canTransformVia404() && !( $flags & self::RENDER_NOW ) ) { - wfDebug( __METHOD__ . " transformation deferred." ); + wfDebug( __METHOD__ . " transformation deferred.\n" ); // XXX: Pass in the storage path even though we are not rendering anything // and the path is supposed to be an FS path. This is due to getScalerType() // getting called on the path and clobbering $thumb->getUrl() if it's false. diff --git a/includes/jobqueue/JobQueueDB.php b/includes/jobqueue/JobQueueDB.php index 6097d31..e83c26d 100644 --- a/includes/jobqueue/JobQueueDB.php +++ b/includes/jobqueue/JobQueueDB.php @@ -318,7 +318,7 @@ $title = Title::makeTitleSafe( $row->job_namespace, $row->job_title ); if ( !$title ) { $dbw->delete( 'job', array( 'job_id' => $row->job_id ), __METHOD__ ); - wfDebug( "Row has invalid title '{$row->job_title}'." ); + wfDebug( "Row has invalid title '{$row->job_title}'.\n" ); continue; // try again } $job = Job::factory( $row->job_cmd, $title, @@ -463,7 +463,7 @@ array( 'job_cmd' => $this->type, 'job_token' => $uuid ), __METHOD__ ); if ( !$row ) { // raced out by duplicate job removal - wfDebug( "Row deleted as duplicate by another process." ); + wfDebug( "Row deleted as duplicate by another process.\n" ); } } else { break; // nothing to do diff --git a/includes/parser/Parser.php b/includes/parser/Parser.php index f2c4fbf..f845ecd 100644 --- a/includes/parser/Parser.php +++ b/includes/parser/Parser.php @@ -3416,7 +3416,8 @@ } } elseif ( MWNamespace::isNonincludable( $title->getNamespace() ) ) { $found = false; # access denied - wfDebug( __METHOD__ . ": template inclusion denied for " . $title->getPrefixedDBkey() ); + wfDebug( __METHOD__ . ": template inclusion denied for " . + $title->getPrefixedDBkey() . "\n" ); } else { list( $text, $title ) = $this->getTemplateDom( $title ); if ( $text !== false ) { @@ -5206,7 +5207,7 @@ $handlerOptions[$paramName] = $match; } else { // Guess not. Append it to the caption. - wfDebug( "$parameterMatch failed parameter validation" ); + wfDebug( "$parameterMatch failed parameter validation\n" ); $label .= '|' . $parameterMatch; } } diff --git a/includes/specials/SpecialContributions.php b/includes/specials/SpecialContributions.php index af4f852..51606b7 100644 --- a/includes/specials/SpecialContributions.php +++ b/includes/specials/SpecialContributions.php @@ -1095,7 +1095,7 @@ wfRunHooks( 'ContributionsLineEnding', array( $this, &$ret, $row, &$classes ) ); if ( $classes === array() && $ret === '' ) { - wfDebug( 'Dropping Special:Contribution row that could not be formatted' ); + wfDebug( "Dropping Special:Contribution row that could not be formatted\n" ); $ret = "<!-- Could not format Special:Contribution row. -->\n"; } else { $ret = Html::rawElement( 'li', array( 'class' => $classes ), $ret ) . "\n"; diff --git a/includes/specials/SpecialUpload.php b/includes/specials/SpecialUpload.php index 4887daf..b46f942 100644 --- a/includes/specials/SpecialUpload.php +++ b/includes/specials/SpecialUpload.php @@ -186,7 +186,7 @@ } else { # Backwards compatibility hook if ( !wfRunHooks( 'UploadForm:initial', array( &$this ) ) ) { - wfDebug( "Hook 'UploadForm:initial' broke output of the upload form" ); + wfDebug( "Hook 'UploadForm:initial' broke output of the upload form\n" ); return; } diff --git a/includes/specials/SpecialUploadStash.php b/includes/specials/SpecialUploadStash.php index 964bea1..33883b0 100644 --- a/includes/specials/SpecialUploadStash.php +++ b/includes/specials/SpecialUploadStash.php @@ -339,7 +339,7 @@ public static function tryClearStashedUploads( $formData ) { if ( isset( $formData['Clear'] ) ) { $stash = RepoGroup::singleton()->getLocalRepo()->getUploadStash(); - wfDebug( "stash has: " . print_r( $stash->listFiles(), true ) ); + wfDebug( 'stash has: ' . print_r( $stash->listFiles(), true ) . "\n" ); if ( !$stash->clear() ) { return Status::newFatal( 'uploadstash-errclear' ); diff --git a/includes/specials/SpecialUserrights.php b/includes/specials/SpecialUserrights.php index 2a54ad7..db9a992 100644 --- a/includes/specials/SpecialUserrights.php +++ b/includes/specials/SpecialUserrights.php @@ -265,8 +265,8 @@ // update groups in external authentication database $wgAuth->updateExternalDBGroups( $user, $add, $remove ); - wfDebug( 'oldGroups: ' . print_r( $oldGroups, true ) ); - wfDebug( 'newGroups: ' . print_r( $newGroups, true ) ); + wfDebug( 'oldGroups: ' . print_r( $oldGroups, true ) . "\n" ); + wfDebug( 'newGroups: ' . print_r( $newGroups, true ) . "\n" ); wfRunHooks( 'UserRights', array( &$user, $add, $remove ) ); if ( $newGroups != $oldGroups ) { diff --git a/languages/utils/CLDRPluralRuleEvaluator.php b/languages/utils/CLDRPluralRuleEvaluator.php index e9b7e02..e420cb2 100644 --- a/languages/utils/CLDRPluralRuleEvaluator.php +++ b/languages/utils/CLDRPluralRuleEvaluator.php @@ -73,7 +73,7 @@ // Calculate the values of the operand symbols $number = strval( $number ); if ( !preg_match( '/^ -? ( ([0-9]+) (?: \. ([0-9]+) )? )$/x', $number, $m ) ) { - wfDebug( __METHOD__ . ': invalid number input, returning "other"' ); + wfDebug( __METHOD__ . ": invalid number input, returning 'other'\n" ); return count( $rules ); } if ( !isset( $m[3] ) ) { -- To view, visit https://gerrit.wikimedia.org/r/121928 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I727ebae2bd4df0e26019985ce8c7ce73381c5642 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: IAlex <coderev...@emsenhuber.ch> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits