X-Git-Url: http://git.heureux-cyclage.org/?a=blobdiff_plain;f=maintenance%2FsyncFileBackend.php;h=14a1502f8a498629d3fc724cffe34ae66463551d;hb=cd73babf22a135f63ef3403283e4243f2b9c1323;hp=c505b1482e325087f69b3c437af71ef6e9ca5394;hpb=d89467e2af726ac08e32d0201e75712151e2273f;p=lhc%2Fweb%2Fwiklou.git diff --git a/maintenance/syncFileBackend.php b/maintenance/syncFileBackend.php index c505b1482e..14a1502f8a 100644 --- a/maintenance/syncFileBackend.php +++ b/maintenance/syncFileBackend.php @@ -71,6 +71,7 @@ class SyncFileBackend extends Maintenance { if ( $this->isQuiet() ) { print $id; // give a single machine-readable number } + return; } @@ -104,7 +105,7 @@ class SyncFileBackend extends Maintenance { } // Periodically update the position file - $callback = function( $pos ) use ( $startFromPosFile, $posFile, $start ) { + $callback = function ( $pos ) use ( $startFromPosFile, $posFile, $start ) { if ( $startFromPosFile && $pos >= $start ) { // successfully advanced file_put_contents( $posFile, $pos, LOCK_EX ); } @@ -238,6 +239,7 @@ class SyncFileBackend extends Maintenance { if ( !$fsFile ) { $this->error( "Unable to sync '$dPath': could not get local copy." ); $status->fatal( 'backend-fail-internal', $src->getName() ); + return $status; } $fsFiles[] = $fsFile; // keep TempFSFile objects alive as needed @@ -254,6 +256,7 @@ class SyncFileBackend extends Maintenance { } else { // error $this->error( "Unable to sync '$dPath': could not stat file." ); $status->fatal( 'backend-fail-internal', $src->getName() ); + return $status; } } @@ -277,6 +280,7 @@ class SyncFileBackend extends Maintenance { * Substitute the backend name of storage paths with that of a given one * * @param array|string $paths List of paths or single string path + * @param FileBackend $backend * @return array|string */ protected function replaceNamePaths( $paths, FileBackend $backend ) {