From: Sam Reed Date: Sun, 21 Aug 2011 15:24:44 +0000 (+0000) Subject: Add in \n from/to r95055 to LoadBalancer.php X-Git-Tag: 1.31.0-rc.0~28143 X-Git-Url: http://git.cyclocoop.org/fichier?a=commitdiff_plain;h=7a06cb7d580d11afc3352687b579725cdf343e0d;p=lhc%2Fweb%2Fwiklou.git Add in \n from/to r95055 to LoadBalancer.php Differentiate error messages from r95050 per Hashar --- diff --git a/includes/db/LoadBalancer.php b/includes/db/LoadBalancer.php index 671415bfbc..171ca2ed21 100644 --- a/includes/db/LoadBalancer.php +++ b/includes/db/LoadBalancer.php @@ -241,7 +241,7 @@ class LoadBalancer { $i = $this->getRandomNonLagged( $currentLoads, $wiki ); if ( $i === false && count( $currentLoads ) != 0 ) { # All slaves lagged. Switch to read-only mode - wfDebugLog( 'replication', 'All slaves lagged. Switch to read-only mode' ); + wfDebugLog( 'replication', "All slaves lagged. Switch to read-only mode\n" ); $wgReadOnly = wfMessage( 'readonly_lag' )->useDatabase( false )->plain(); $i = $this->pickRandom( $currentLoads ); $laggedSlaveMode = true; diff --git a/includes/media/Generic.php b/includes/media/Generic.php index ffc1a2355e..e22aad8789 100644 --- a/includes/media/Generic.php +++ b/includes/media/Generic.php @@ -495,9 +495,16 @@ abstract class MediaHandler { $thumbstat = stat( $dstPath ); if( $thumbstat['size'] == 0 || $retval != 0 ) { $result = unlink( $dstPath ); - wfDebugLog( 'thumbnail', - sprintf( 'Removing bad %d-byte thumbnail "%s". unlink() result: %d', - $thumbstat['size'], $dstPath, $result ) ); + + if ( $result ) { + wfDebugLog( 'thumbnail', + sprintf( 'Removing bad %d-byte thumbnail "%s". unlink() succeeded', + $thumbstat['size'], $dstPath ) ); + } else { + wfDebugLog( 'thumbnail', + sprintf( 'Removing bad %d-byte thumbnail "%s". unlink() failed', + $thumbstat['size'], $dstPath ) ); + } return true; } } diff --git a/maintenance/deleteBatch.php b/maintenance/deleteBatch.php index f5f850a769..fdc4cfb31a 100644 --- a/maintenance/deleteBatch.php +++ b/maintenance/deleteBatch.php @@ -81,7 +81,6 @@ class DeleteBatch extends Maintenance { continue; } - $this->output( $page->getPrefixedText() ); $dbw->begin(); if ( $page->getNamespace() == NS_FILE ) {