Commit ea7304b6 authored by Christoph Hofmann's avatar Christoph Hofmann

update

parent 69bcccbd
......@@ -112,6 +112,8 @@ class CleanupFiles extends \TYPO3\CMS\Scheduler\Task\AbstractTask {
'1:/tutorials/',
'1:/Dummy_Download_for_Template/',
'1:/downloads/Dummy_Download_for_Template/',
'1:/_temp_/',
'1:/user_upload/_temp_/',
];
$resourceFactory = GeneralUtility::makeInstance(ResourceFactory::class);
$success = FALSE;
......@@ -130,7 +132,7 @@ class CleanupFiles extends \TYPO3\CMS\Scheduler\Task\AbstractTask {
exit;
}
$table = 'sys_file';
$connectionPool = GeneralUtility::makeInstance(ConnectionPool::class);
$queryBuilder = $connectionPool->getQueryBuilderForTable($table);
......@@ -333,6 +335,10 @@ class CleanupFiles extends \TYPO3\CMS\Scheduler\Task\AbstractTask {
private function checkMoveOK(\TYPO3\CMS\Core\Resource\File $file)
{
$st = $file->getStorage();
if ($file->getParentFolder() == $st->getRootLevelFolder()) {
return false;
}
$identifier = $file->getCombinedIdentifier();
foreach ($this->mustMove as $id) {
if (strpos($identifier,$id) !== false) {
......
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