Commit d06869c0 authored by Richard Mansfield's avatar Richard Mansfield Committed by Gerrit Code Review
Browse files

Merge "Check import dir exists before running cron over it"

parents a1b6ca6c 32784fed
......@@ -564,6 +564,9 @@ class MnetImporterTransport extends ImporterTransport {
function import_cleanup_old_imports() {
require_once('file.php');
$basedir = get_config('dataroot') . 'import/';
if (!check_dir_exists($basedir, false)) {
return;
}
$importdir = new DirectoryIterator($basedir);
$mintime = time() - (12 * 60 * 60); // delete imports older than 12 hours
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment