Les archives d'autorisations parentales étaient invalides
This commit is contained in:
parent
67420ed5c7
commit
d135147939
|
@ -155,7 +155,9 @@ function getZipFile($problem, $team_id = -1)
|
||||||
foreach ($data as $file) {
|
foreach ($data as $file) {
|
||||||
$file_id = $file->getFileId();
|
$file_id = $file->getFileId();
|
||||||
$user = User::fromId($file->getUserId());
|
$user = User::fromId($file->getUserId());
|
||||||
$name = "Autorisation de droit à l'image de " . $user->getFirstName() . " " . $user->getSurname() . ".pdf";
|
$mime_type = finfo_file(finfo_open(FILEINFO_MIME_TYPE), "$LOCAL_PATH/files/$file_id");
|
||||||
|
$ext = $mime_type == "application/pdf" ? "pdf" : ($mime_type == "image/png" ? "png" : "jpg");
|
||||||
|
$name = "Autorisation de droit à l'image de " . $user->getFirstName() . " " . $user->getSurname() . "." . $ext;
|
||||||
|
|
||||||
$zip->addFile("$LOCAL_PATH/files/$file_id", $name);
|
$zip->addFile("$LOCAL_PATH/files/$file_id", $name);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue