diff options
Diffstat (limited to 'app/fn/fn.php')
-rw-r--r-- | app/fn/fn.php | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/app/fn/fn.php b/app/fn/fn.php index dfee01d..fd609c1 100644 --- a/app/fn/fn.php +++ b/app/fn/fn.php @@ -77,7 +77,11 @@ function idclean(string $input) $replace = ['e', 'a', 'e', 'c', 'u', 'i', 'i', '-']; $input = str_replace($search, $replace, $input); - return preg_replace('%[^a-z0-9-_+]%', '', strtolower(trim($input))); + $input = preg_replace('%[^a-z0-9-_+]%', '', strtolower(trim($input))); + + $input = substr($input, 0, Model::MAX_ID_LENGTH); + + return $input; } |