admin logs

This commit is contained in:
Etienne Roudeix
2013-10-29 12:22:34 +01:00
parent 1950e1f3c5
commit 082f9aff8d
27 changed files with 1838 additions and 1491 deletions

View File

@@ -118,20 +118,6 @@ class FileManager
$directory = $this->getUploadDir($parentType, $fileType);
$fileName = $this->renameFile($model->getId(), $uploadedFile);
$this->adminLogAppend(
$this->translator->trans(
'Uploading %type% %fileName% to %directory% for parent_id %parentId% (%parentType%)',
array(
'%type%' => $fileType,
'%fileName%' => $uploadedFile->getClientOriginalName(),
'%directory%' => $directory . '/' . $fileName,
'%parentId%' => $parentId,
'%parentType%' => $parentType
),
'image'
)
);
$newUploadedFile = $uploadedFile->move($directory, $fileName);
$model->setFile($fileName);
@@ -282,20 +268,6 @@ class FileManager
return strtolower(preg_replace('/[^a-zA-Z0-9-_\.]/', '', $string));
}
/**
* Helper to append a message to the admin log.
*
* @param string $message
*/
public function adminLogAppend($message)
{
AdminLog::append(
$message,
$this->container->get('request'),
$this->container->get('thelia.securityContext')->getAdminUser()
);
}
/**
* Delete image from file storage and database
*