X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=blobdiff_plain;f=maintenance%2FfindOrphanedFiles.php;h=57e04e0ea19aca0e167c5d840c1ec51a0acf5c02;hp=765fbe4a0aa0f5265ba3f540c5b85c6297bc78fe;hb=7babd362babcbf7f20adb8e12edb4f4bc1d4249f;hpb=313dde5d06c42be1eb7da9127ec92bb5d360ddab diff --git a/maintenance/findOrphanedFiles.php b/maintenance/findOrphanedFiles.php index 765fbe4a0a..57e04e0ea1 100644 --- a/maintenance/findOrphanedFiles.php +++ b/maintenance/findOrphanedFiles.php @@ -37,7 +37,7 @@ class FindOrphanedFiles extends Maintenance { $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' ); @@ -51,7 +51,7 @@ class FindOrphanedFiles extends Maintenance { $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 = []; @@ -61,7 +61,7 @@ class FindOrphanedFiles extends Maintenance { } $pathBatch[] = $path; - if ( count( $pathBatch ) >= $this->mBatchSize ) { + if ( count( $pathBatch ) >= $this->getBatchSize() ) { $this->checkFiles( $repo, $pathBatch, $verbose ); $pathBatch = []; } @@ -151,5 +151,5 @@ class FindOrphanedFiles extends Maintenance { } } -$maintClass = 'FindOrphanedFiles'; +$maintClass = FindOrphanedFiles::class; require_once RUN_MAINTENANCE_IF_MAIN;