From 20c55aba325ff2c83e65dedce47192f92d14d32a Mon Sep 17 00:00:00 2001 From: Cedric Abonnel Date: Tue, 12 May 2026 23:50:11 +0200 Subject: [PATCH] =?UTF-8?q?fix:=20suppression=20doublon=20slugify()=20d?= =?UTF-8?q?=C3=A9j=C3=A0=20d=C3=A9clar=C3=A9e=20dans=20helpers.php?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/auth.php | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/src/auth.php b/src/auth.php index ddb3113..5fe42e8 100644 --- a/src/auth.php +++ b/src/auth.php @@ -99,21 +99,6 @@ function profileBySlug(string $slug): ?array } } -function slugify(string $text): string -{ - $map = [ - 'à' => 'a', 'â' => 'a', 'ä' => 'a', - 'é' => 'e', 'è' => 'e', 'ê' => 'e', 'ë' => 'e', - 'î' => 'i', 'ï' => 'i', - 'ô' => 'o', 'ö' => 'o', - 'ù' => 'u', 'û' => 'u', 'ü' => 'u', - 'ç' => 'c', 'æ' => 'ae', 'œ' => 'oe', - ]; - $s = mb_strtolower($text, 'UTF-8'); - $s = strtr($s, $map); - $s = preg_replace('/[^a-z0-9]+/', '-', $s); - return trim((string)$s, '-'); -} function dbPdo(): ?PDO {