From 24b76af3a83408039f4138a78d70efdb6b986998 Mon Sep 17 00:00:00 2001 From: Jan Gerber Date: Thu, 19 Jul 2012 20:29:11 +0000 Subject: [PATCH] use FileRepo api to delete and check for files instead of direct file access use FileRepo api, this way the script works for remote backends too. Change-Id: I08c29cec4bc685c422630487b91458d13184fe94 --- maintenance/deleteArchivedFiles.inc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/maintenance/deleteArchivedFiles.inc b/maintenance/deleteArchivedFiles.inc index 728997d081..e638b17cb4 100644 --- a/maintenance/deleteArchivedFiles.inc +++ b/maintenance/deleteArchivedFiles.inc @@ -50,8 +50,8 @@ class DeleteArchivedFilesImplementation { __METHOD__, array( 'FOR UPDATE' ) ); - if ( $path && file_exists( $path ) && !$inuse ) { - if( unlink( $path ) ) { // delete + if ( $path && $repo->fileExists( $path ) && !$inuse ) { + if ( $repo->quickPurge( $path ) ) { $count++; $dbw->query( "DELETE FROM $tbl_arch WHERE fa_id = $id" ); } else { -- 2.20.1