diff --git a/sources/Application/BulkExport/BulkExportResultGC.php b/sources/Application/BulkExport/BulkExportResultGC.php new file mode 100644 index 000000000..868cab80f --- /dev/null +++ b/sources/Application/BulkExport/BulkExportResultGC.php @@ -0,0 +1,38 @@ + true) /* order by*/, array(), null, 1 /* limit count */); + $oSet->OptimizeColumnLoad(array('BulkExportResult' => array('temp_file_path'))); + $oResult = $oSet->Fetch(); + if (is_null($oResult)) { + // Nothing to be done + break; + } + $iProcessed++; + @unlink($oResult->Get('temp_file_path')); + utils::PushArchiveMode(false); + $oResult->DBDelete(); + utils::PopArchiveMode(); + } + return "Cleaned $iProcessed old export results(s)."; + } +} \ No newline at end of file