* http://www.gnu.org/copyleft/gpl.html
*
* @file
- * @author Aaron Schulz
*/
require_once __DIR__ . '/Maintenance.php';
$repo = RepoGroup::singleton()->getLocalRepo();
if ( $repo->hasSha1Storage() ) {
- $this->error( "Local repo uses SHA-1 file storage names; aborting.", 1 );
+ $this->fatalError( "Local repo uses SHA-1 file storage names; aborting." );
}
$directory = $repo->getZonePath( 'public' );
$list = $repo->getBackend()->getFileList( [ 'dir' => $directory ] );
if ( $list === null ) {
- $this->error( "Could not get file listing.", 1 );
+ $this->fatalError( "Could not get file listing." );
}
$pathBatch = [];
}
$pathBatch[] = $path;
- if ( count( $pathBatch ) >= $this->mBatchSize ) {
+ if ( count( $pathBatch ) >= $this->getBatchSize() ) {
$this->checkFiles( $repo, $pathBatch, $verbose );
$pathBatch = [];
}
return;
}
- $dbr = $repo->getSlaveDB();
+ $dbr = $repo->getReplicaDB();
$curNames = [];
$oldNames = [];
}
}
-$maintClass = 'FindOrphanedFiles';
+$maintClass = FindOrphanedFiles::class;
require_once RUN_MAINTENANCE_IF_MAIN;