Add in \n from/to r95055 to LoadBalancer.php
Differentiate error messages from r95050 per Hashar
This commit is contained in:
parent
d88f2a0443
commit
7a06cb7d58
3 changed files with 11 additions and 5 deletions
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -81,7 +81,6 @@ class DeleteBatch extends Maintenance {
|
|||
continue;
|
||||
}
|
||||
|
||||
|
||||
$this->output( $page->getPrefixedText() );
|
||||
$dbw->begin();
|
||||
if ( $page->getNamespace() == NS_FILE ) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue