diff options
author | vincent-peugnet <v.peugnet@free.fr> | 2019-01-10 22:44:39 +0100 |
---|---|---|
committer | vincent-peugnet <v.peugnet@free.fr> | 2019-01-10 22:44:39 +0100 |
commit | cc7ad5299f1bd14155d4c01af3a4ece28f85c20c (patch) | |
tree | 0aea5a3253e98525286ace4240c449372f12e3ef /app/fn/fn.php | |
parent | 6f0f6c3f8ff7a2e17ecff410b5f0e974e4dad4cb (diff) | |
download | wcms-cc7ad5299f1bd14155d4c01af3a4ece28f85c20c.tar.gz wcms-cc7ad5299f1bd14155d4c01af3a4ece28f85c20c.zip |
bug fixies
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; } |