diff options
author | Vincent Peugnet <33429034+vincent-peugnet@users.noreply.github.com> | 2020-12-22 12:35:31 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-12-22 12:35:31 +0100 |
commit | f30ec46d410f4c0bf986929e132f8a9efd4d0530 (patch) | |
tree | 9baaa6e940c85e018273a48b410e24c94e32d8fb /app/fn/fn.php | |
parent | 8a8aebc3606c9ad7a59c93df90b2e591709bb717 (diff) | |
parent | f6cc150d7052751d5c226ff8050db90d57355ed7 (diff) | |
download | wcms-f30ec46d410f4c0bf986929e132f8a9efd4d0530.tar.gz wcms-f30ec46d410f4c0bf986929e132f8a9efd4d0530.zip |
Merge pull request #130 from n-peugnet/deps
build(deps): fix github ci
Diffstat (limited to 'app/fn/fn.php')
-rw-r--r-- | app/fn/fn.php | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/app/fn/fn.php b/app/fn/fn.php index e0e5f47..844518a 100644 --- a/app/fn/fn.php +++ b/app/fn/fn.php @@ -102,9 +102,9 @@ function idclean(string $input, int $max = Wcms\Model::MAX_ID_LENGTH): string $search = ['é', 'à', 'è', 'ç', 'ù', 'ï', 'î', ' ']; $replace = ['e', 'a', 'e', 'c', 'u', 'i', 'i', '-']; $input = str_replace($search, $replace, $input); - + $input = preg_replace($regex, '', strtolower(trim($input))); - + $input = substr($input, 0, $max); } return $input; @@ -439,14 +439,14 @@ function accessfile(string $path, bool $createdir = false): bool function file_upload_max_size() { static $max_size = -1; - + if ($max_size < 0) { // Start with post_max_size. $post_max_size = parse_size(ini_get('post_max_size')); if ($post_max_size > 0) { $max_size = $post_max_size; } - + // If upload_max_size is less, then reduce. Except if upload_max_size is // zero, which indicates no limit. $upload_max = parse_size(ini_get('upload_max_filesize')); @@ -456,7 +456,7 @@ function file_upload_max_size() } return $max_size; } - + function parse_size($size) { $unit = preg_replace('/[^bkmgtpezy]/i', '', $size); // Remove the non-unit characters from the size. |