/**
- * @var FileRepository
+ * @var \TYPO3\CMS\Core\Resource\FileRepository
*/
protected $fileRepository;
TRUE
);
$this->addFlashMessage($flashMessage);
-
+ // Log success
+ $this->writelog(4, 0, 1, 'File "%s" deleted', array($fileObject->getIdentifier()));
} catch (\TYPO3\CMS\Core\Resource\Exception\InsufficientFileAccessPermissionsException $e) {
$this->writelog(4, 1, 112, 'You are not allowed to access the file', array($fileObject->getIdentifier()));
} catch (\TYPO3\CMS\Core\Resource\Exception\NotInMountPointException $e) {
} catch (\RuntimeException $e) {
$this->writelog(4, 1, 110, 'Could not delete file "%s". Write-permission problem?', array($fileObject->getIdentifier()));
}
- // Log success
- $this->writelog(4, 0, 1, 'File "%s" deleted', array($fileObject->getIdentifier()));
}
} else {
try {
TRUE
);
$this->addFlashMessage($flashMessage);
+ // Log success
+ $this->writelog(4, 0, 3, 'Directory "%s" deleted', array($fileObject->getIdentifier()));
}
-
} catch (\TYPO3\CMS\Core\Resource\Exception\InsufficientFileAccessPermissionsException $e) {
$this->writelog(4, 1, 123, 'You are not allowed to access the directory', array($fileObject->getIdentifier()));
} catch (\TYPO3\CMS\Core\Resource\Exception\NotInMountPointException $e) {
} catch (\RuntimeException $e) {
$this->writelog(4, 1, 120, 'Could not delete directory! Write-permission problem? Is directory "%s" empty? (You are not allowed to delete directories recursively).', array($fileObject->getIdentifier()));
}
- // Log success
- $this->writelog(4, 0, 3, 'Directory "%s" deleted', array($fileObject->getIdentifier()));
}
return $result;
}
// Don't allow overwriting existing files
$resultObject = $sourceFileObject->moveTo($targetFolderObject, NULL, 'cancel');
}
+ $this->writelog(3, 0, 1, 'File "%s" moved to "%s"', array($sourceFileObject->getIdentifier(), $resultObject->getIdentifier()));
} catch (\TYPO3\CMS\Core\Resource\Exception\InsufficientUserPermissionsException $e) {
$this->writelog(3, 1, 114, 'You are not allowed to move files', '');
} catch (\TYPO3\CMS\Core\Resource\Exception\InsufficientFileAccessPermissionsException $e) {
} catch (\RuntimeException $e) {
$this->writelog(3, 2, 109, 'File "%s" WAS NOT copied to "%s"! Write-permission problem?', array($sourceFileObject->getIdentifier(), $targetFolderObject->getIdentifier()));
}
- $this->writelog(3, 0, 1, 'File "%s" moved to "%s"', array($sourceFileObject->getIdentifier(), $resultObject->getIdentifier()));
} else {
// Else means this is a Folder
$sourceFolderObject = $sourceFileObject;
// Don't allow overwriting existing files
$resultObject = $sourceFolderObject->moveTo($targetFolderObject, NULL, 'renameNewFile');
}
+ $this->writelog(3, 0, 2, 'Directory "%s" moved to "%s"', array($sourceFolderObject->getIdentifier(), $targetFolderObject->getIdentifier()));
} catch (\TYPO3\CMS\Core\Resource\Exception\InsufficientUserPermissionsException $e) {
$this->writelog(3, 1, 125, 'You are not allowed to move directories', '');
} catch (\TYPO3\CMS\Core\Resource\Exception\InsufficientFileAccessPermissionsException $e) {
} catch (\RuntimeException $e) {
$this->writelog(3, 2, 119, 'Directory "%s" WAS NOT moved to "%s"! Write-permission problem?', array($sourceFolderObject->getIdentifier(), $targetFolderObject->getIdentifier()));
}
- $this->writelog(3, 0, 2, 'Directory "%s" moved to "%s"', array($sourceFolderObject->getIdentifier(), $targetFolderObject->getIdentifier()));
}
return $resultObject;
}
try {
// Try to rename the File
$resultObject = $sourceFileObject->rename($targetFile);
+ $this->writelog(5, 0, 1, 'File renamed from "%s" to "%s"', array($sourceFileObject->getName(), $targetFile));
} catch (\TYPO3\CMS\Core\Resource\Exception\InsufficientUserPermissionsException $e) {
$this->writelog(5, 1, 102, 'You are not allowed to rename files!', '');
} catch (\TYPO3\CMS\Core\Resource\Exception\IllegalFileExtensionException $e) {
} catch (\RuntimeException $e) {
$this->writelog(5, 1, 100, 'File "%s" was not renamed! Write-permission problem in "%s"?', array($sourceFileObject->getName(), $targetFile));
}
- $this->writelog(5, 0, 1, 'File renamed from "%s" to "%s"', array($sourceFileObject->getName(), $targetFile));
} else {
// Else means this is a Folder
try {
// Try to rename the Folder
$resultObject = $sourceFileObject->rename($targetFile);
+ $this->writelog(5, 0, 2, 'Directory renamed from "%s" to "%s"', array($sourceFileObject->getName(), $targetFile));
} catch (\TYPO3\CMS\Core\Resource\Exception\InsufficientUserPermissionsException $e) {
$this->writelog(5, 1, 111, 'You are not allowed to rename directories!', '');
} catch (\TYPO3\CMS\Core\Resource\Exception\ExistingTargetFileNameException $e) {
} catch (\RuntimeException $e) {
$this->writelog(5, 1, 110, 'Directory "%s" was not renamed! Write-permission problem in "%s"?', array($sourceFileObject->getName(), $targetFile));
}
- $this->writelog(5, 0, 2, 'Directory renamed from "%s" to "%s"', array($sourceFileObject->getName(), $targetFile));
}
return $resultObject;
}