Add in \n from/to r95055 to LoadBalancer.php

Differentiate error messages from r95050 per Hashar
This commit is contained in:
Sam Reed 2011-08-21 15:24:44 +00:00
parent d88f2a0443
commit 7a06cb7d58
3 changed files with 11 additions and 5 deletions

View file

@ -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;

View file

@ -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;
}
}

View file

@ -81,7 +81,6 @@ class DeleteBatch extends Maintenance {
continue;
}
$this->output( $page->getPrefixedText() );
$dbw->begin();
if ( $page->getNamespace() == NS_FILE ) {