diff options
author | n-peugnet <n.peugnet@free.fr> | 2019-11-04 23:31:31 +0100 |
---|---|---|
committer | n-peugnet <n.peugnet@free.fr> | 2019-11-05 19:06:40 +0100 |
commit | e802d5204b96d645ec3d40b81b4a8bdc6e0ee675 (patch) | |
tree | 8e6db5e36ad8f247b442583e1e9e5da2934f4b52 /app/fn | |
parent | f1f63f556c41c99d45cd610186b0982383eff375 (diff) | |
download | wcms-e802d5204b96d645ec3d40b81b4a8bdc6e0ee675.tar.gz wcms-e802d5204b96d645ec3d40b81b4a8bdc6e0ee675.zip |
refactor: switch to psr-4 autoloading
Diffstat (limited to 'app/fn')
-rw-r--r-- | app/fn/fn.php | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/app/fn/fn.php b/app/fn/fn.php index 9c011ef..f462d2d 100644 --- a/app/fn/fn.php +++ b/app/fn/fn.php @@ -1,14 +1,5 @@ <?php - -function class_autoloader($class) -{ - require('.'. DIRECTORY_SEPARATOR . 'app' . DIRECTORY_SEPARATOR . 'class' . DIRECTORY_SEPARATOR . strtolower(str_replace('\\', DIRECTORY_SEPARATOR, $class)) . '.php'); -} - - - - function readablesize($bytes) { $format = ' %d %s'; @@ -76,7 +67,7 @@ function idclean(string $input) $input = preg_replace('%[^a-z0-9-_+]%', '', strtolower(trim($input))); - $input = substr($input, 0, Model::MAX_ID_LENGTH); + $input = substr($input, 0, Wcms\Model::MAX_ID_LENGTH); return $input; } |