|
|
|
@ -61,10 +61,11 @@ function sprite($img, $nom) {
|
|
|
|
|
* @return bool|mixed l'extension du fichier, ou false si l'extension n'est pas gif jpg ou png |
|
|
|
|
*/ |
|
|
|
|
function creer_sprites_terminaison_fichier_image($fichier) { |
|
|
|
|
if (preg_match(',^(?>.*)(?<=\.(gif|jpg|webp|png)),', $fichier, $regs)) { |
|
|
|
|
if (preg_match(',\.(gif|jpg|webp|png),', $fichier, $regs)) { |
|
|
|
|
$terminaison = $regs[1]; |
|
|
|
|
return $terminaison; |
|
|
|
|
} else { |
|
|
|
|
debug_log ("Erreur : extension de fichier non reconnue pour '$fichier'", 'creer_sprite', 1); |
|
|
|
|
return false; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|