fix: suppression doublon slugify() déjà déclarée dans helpers.php

This commit is contained in:
Cedric Abonnel
2026-05-12 23:50:11 +02:00
parent 654542f13b
commit 20c55aba32
-15
View File
@@ -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 function dbPdo(): ?PDO
{ {