Merge branch 'wip-mdl-48605-m28' of https://github.com/rajeshtaneja/moodle into MOODLE_28_STABLE
This commit is contained in:
@@ -88,8 +88,10 @@ class file_temp_cleanup_task extends scheduled_task {
|
||||
}
|
||||
}
|
||||
} else {
|
||||
// Return the time modified to the original date.
|
||||
touch($node, $modifieddateobject[$node]);
|
||||
// Return the time modified to the original date only for real files.
|
||||
if ($iter->isDir() && !$iter->isDot()) {
|
||||
touch($node, $modifieddateobject[$node]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -395,8 +395,10 @@ class core_scheduled_task_testcase extends advanced_testcase {
|
||||
$iter = new \RecursiveIteratorIterator($dir, \RecursiveIteratorIterator::CHILD_FIRST);
|
||||
|
||||
for ($iter->rewind(); $iter->valid(); $iter->next()) {
|
||||
$node = $iter->getRealPath();
|
||||
touch($node, time() - (8 * 24 * 3600));
|
||||
if ($iter->isDir() && !$iter->isDot()) {
|
||||
$node = $iter->getRealPath();
|
||||
touch($node, time() - (8 * 24 * 3600));
|
||||
}
|
||||
}
|
||||
|
||||
// Run the scheduled task again to remove all of the files and directories.
|
||||
|
||||
Reference in New Issue
Block a user