aboutsummaryrefslogtreecommitdiff
path: root/app/fn
diff options
context:
space:
mode:
authorvincent-peugnet <v.peugnet@free.fr>2019-01-10 22:44:39 +0100
committervincent-peugnet <v.peugnet@free.fr>2019-01-10 22:44:39 +0100
commitcc7ad5299f1bd14155d4c01af3a4ece28f85c20c (patch)
tree0aea5a3253e98525286ace4240c449372f12e3ef /app/fn
parent6f0f6c3f8ff7a2e17ecff410b5f0e974e4dad4cb (diff)
downloadwcms-cc7ad5299f1bd14155d4c01af3a4ece28f85c20c.tar.gz
wcms-cc7ad5299f1bd14155d4c01af3a4ece28f85c20c.zip
bug fixies
Diffstat (limited to 'app/fn')
-rw-r--r--app/fn/fn.php6
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;
}