X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=blobdiff_plain;f=maintenance%2FeraseArchivedFile.php;h=c90056db4539b6baee074697bac791d45ea85595;hp=2fcdd140ee8871f47a74340ac5396c5b7612aac3;hb=f5b9af121a07ecc674a63cbc65c3a01e9fa7d785;hpb=74174fca253b9a759d7402f09b7fc37d5de0e9be diff --git a/maintenance/eraseArchivedFile.php b/maintenance/eraseArchivedFile.php index 2fcdd140ee..c90056db45 100644 --- a/maintenance/eraseArchivedFile.php +++ b/maintenance/eraseArchivedFile.php @@ -19,7 +19,6 @@ * * @file * @ingroup Maintenance - * @author Aaron Schulz */ require_once __DIR__ . '/Maintenance.php'; @@ -57,7 +56,7 @@ class EraseArchivedFile extends Maintenance { } else { // specified version $dbw = $this->getDB( DB_MASTER ); $row = $dbw->selectRow( 'filearchive', '*', - array( 'fa_storage_group' => 'deleted', 'fa_storage_key' => $filekey ), + [ 'fa_storage_group' => 'deleted', 'fa_storage_key' => $filekey ], __METHOD__ ); if ( !$row ) { $this->error( "No deleted file exists with key '$filekey'.", 1 ); @@ -87,7 +86,7 @@ class EraseArchivedFile extends Maintenance { protected function scrubAllVersions( $name ) { $dbw = $this->getDB( DB_MASTER ); $res = $dbw->select( 'filearchive', '*', - array( 'fa_name' => $name, 'fa_storage_group' => 'deleted' ), + [ 'fa_name' => $name, 'fa_storage_group' => 'deleted' ], __METHOD__ ); foreach ( $res as $row ) { $this->scrubVersion( ArchivedFile::newFromRow( $row ) ); @@ -101,7 +100,7 @@ class EraseArchivedFile extends Maintenance { $repo = RepoGroup::singleton()->getLocalRepo(); $path = $repo->getZonePath( 'deleted' ) . '/' . $repo->getDeletedHashPath( $key ) . $key; if ( $this->hasOption( 'delete' ) ) { - $status = $repo->getBackend()->delete( array( 'src' => $path ) ); + $status = $repo->getBackend()->delete( [ 'src' => $path ] ); if ( $status->isOK() ) { $this->output( "Deleted version '$key' ($ts) of file '$name'\n" ); } else {