From d343cfde4451330beeda71bf9d70abe7e89db40e Mon Sep 17 00:00:00 2001 From: Fred Tempez Date: Sun, 26 Apr 2020 19:06:10 +0200 Subject: [PATCH] 071 correction accent dans id --- core/class/helper.class.php | 10 +++++----- core/core.php | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/core/class/helper.class.php b/core/class/helper.class.php index e13dd775..bad930fe 100755 --- a/core/class/helper.class.php +++ b/core/class/helper.class.php @@ -221,16 +221,16 @@ class helper { break; case self::FILTER_ID: $text = mb_strtolower($text, 'UTF-8'); - // Supprime les emojis et espaces en fin de chaine - $text = preg_replace('/[[:^print:]]/', '', $text); - $text = rtrim($text); $text = strip_tags(str_replace( explode(',', 'á,à,â,ä,ã,å,ç,é,è,ê,ë,í,ì,î,ï,ñ,ó,ò,ô,ö,õ,ú,ù,û,ü,ý,ÿ,\',", '), explode(',', 'a,a,a,a,a,a,c,e,e,e,e,i,i,i,i,n,o,o,o,o,o,u,u,u,u,y,y,-,-,-'), $text - )); - + )); $text = preg_replace('/([^a-z0-9-])/', '', $text); + // Supprime les emoji + $text = preg_replace('/[[:^print:]]/', '', $text); + // Supprime les tirets en fin de chaine (emoji en fin de nom) + $text = rtrim($text,'-'); // Cas où un identifiant est vide if (empty($text)) { $text = uniqid(''); diff --git a/core/core.php b/core/core.php index 917c9f2d..fa580bd1 100755 --- a/core/core.php +++ b/core/core.php @@ -36,7 +36,7 @@ class common { const THUMBS_WIDTH = 640; // Numéro de version - const ZWII_VERSION = '10.0.070'; + const ZWII_VERSION = '10.0.071'; const ZWII_UPDATE_CHANNEL = "v10"; public static $actions = [];