nuage de tags sur la liste, suppression dropdown navbar, rôles/droits sur le profil
This commit is contained in:
@@ -10,6 +10,15 @@ function vd($var, ...$moreVars)
|
||||
echo "<pre>$output</pre>";
|
||||
}
|
||||
|
||||
function slugify(string $s): string
|
||||
{
|
||||
$map = ['à' => 'a','â' => 'a','ä' => 'a','é' => 'e','è' => 'e','ê' => 'e','ë' => 'e','î' => 'i','ï' => 'i','ô' => 'o','ö' => 'o','ù' => 'u','û' => 'u','ü' => 'u','ç' => 'c','æ' => 'ae','œ' => 'oe'];
|
||||
$s = mb_strtolower($s);
|
||||
$s = strtr($s, $map);
|
||||
$s = (string)preg_replace('/[^a-z0-9]+/', '-', $s);
|
||||
return trim($s, '-');
|
||||
}
|
||||
|
||||
/**
|
||||
* Diff ligne-à-ligne via LCS. Retourne un tableau de [op, line] où
|
||||
* op est '=' (inchangé), '-' (supprimé), '+' (ajouté).
|
||||
|
||||
Reference in New Issue
Block a user