fix: suppression doublon slugify() déjà déclarée dans helpers.php
This commit is contained in:
@@ -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
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user