aboutsummaryrefslogtreecommitdiffstats
path: root/maintenance/purgeChangedFiles.php
diff options
context:
space:
mode:
Diffstat (limited to 'maintenance/purgeChangedFiles.php')
-rw-r--r--maintenance/purgeChangedFiles.php5
1 files changed, 1 insertions, 4 deletions
diff --git a/maintenance/purgeChangedFiles.php b/maintenance/purgeChangedFiles.php
index 91c36f28d1a0..1e702dea779b 100644
--- a/maintenance/purgeChangedFiles.php
+++ b/maintenance/purgeChangedFiles.php
@@ -177,7 +177,6 @@ class PurgeChangedFiles extends Maintenance {
// Sanity check to avoid data loss
$repo->getBackend()->delete( array( 'src' => $file->getPath() ) );
$this->verbose( "Deleted orphan file: {$file->getPath()}.\n" );
-
} else {
$this->error( "File was not deleted: {$file->getPath()}.\n" );
}
@@ -185,7 +184,6 @@ class PurgeChangedFiles extends Maintenance {
// Purge items from fileachive table (rows are likely here)
$this->purgeFromArchiveTable( $repo, $file );
-
} elseif ( $logType === 'move' ) {
// Purge the target file as well
@@ -232,7 +230,6 @@ class PurgeChangedFiles extends Maintenance {
// Sanity check to avoid data loss
$repo->getBackend()->delete( array( 'src' => $ofile->getPath() ) );
$this->output( "Deleted orphan file: {$ofile->getPath()}.\n" );
-
} else {
$this->error( "File was not deleted: {$ofile->getPath()}.\n" );
}
@@ -244,6 +241,7 @@ class PurgeChangedFiles extends Maintenance {
protected function getDeletedPath( LocalRepo $repo, LocalFile $file ) {
$hash = $repo->getFileSha1( $file->getPath() );
$key = "{$hash}.{$file->getExtension()}";
+
return $repo->getDeletedHashPath( $key ) . $key;
}
@@ -257,7 +255,6 @@ class PurgeChangedFiles extends Maintenance {
$this->output( $msg );
}
}
-
}
$maintClass = "PurgeChangedFiles";