Merge "resourceloader: Reduce module_deps write slams after deployments"
[lhc/web/wiklou.git] / maintenance / syncFileBackend.php
index 14a1502..c0663a7 100644 (file)
@@ -32,7 +32,7 @@ require_once __DIR__ . '/Maintenance.php';
 class SyncFileBackend extends Maintenance {
        public function __construct() {
                parent::__construct();
-               $this->mDescription = "Sync one file backend with another using the journal";
+               $this->addDescription( 'Sync one file backend with another using the journal' );
                $this->addOption( 'src', 'Name of backend to sync from', true, true );
                $this->addOption( 'dst', 'Name of destination backend to sync', false, true );
                $this->addOption( 'start', 'Starting journal ID', false, true );
@@ -159,6 +159,7 @@ class SyncFileBackend extends Maintenance {
                        $this->error( "Error: given starting ID greater than ending ID.", 1 );
                }
 
+               $next = null;
                do {
                        $limit = min( $this->mBatchSize, $end - $start + 1 ); // don't go pass ending ID
                        $this->output( "Doing id $start to " . ( $start + $limit - 1 ) . "...\n" );