/trunk/jrest/bibliotheque/ImageRecreation.php |
---|
492,6 → 492,15 |
$id_avec_zeros = sprintf('%09s', $id) ; |
$id_avec_zeros_underscores = wordwrap($id_avec_zeros, 3 , '_', true) ; |
// déterminationnage de l'extension |
$path = $this->obtenirDossierPourFormat($id, $format); |
foreach(['jpg', 'JPG', 'png', 'PNG'] as $ext) { |
if (file_exists($path.'/'.$id_avec_zeros_underscores.'_'.$format.'.'.$ext)) { |
$extension = $ext; |
break; |
} |
} |
$nom_fichier = $id_avec_zeros_underscores.'_'.$format.'.'.$extension; |
return $nom_fichier; |