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 );
$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" );
* 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 ) {