diff options
author | Frederic Guillot <fred@kanboard.net> | 2016-12-19 22:27:13 -0500 |
---|---|---|
committer | Frederic Guillot <fred@kanboard.net> | 2016-12-19 22:27:13 -0500 |
commit | 07c44d2113ee2fe67d6bdaf0018b321b1a6ebc9f (patch) | |
tree | 0e71a12e86ffb65c1b4e8e39e752488c5f9968d2 /app/functions.php | |
parent | eed51aef63d55d8906f3f0e6c707ef1f1739d5ff (diff) |
Avoid code duplication in PR #2891
Diffstat (limited to 'app/functions.php')
-rw-r--r-- | app/functions.php | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/app/functions.php b/app/functions.php index 9dd054fb..7cd59c41 100644 --- a/app/functions.php +++ b/app/functions.php @@ -146,6 +146,17 @@ function get_upload_max_size() } /** + * Get file extension + * + * @param $filename + * @return string + */ +function get_file_extension($filename) +{ + return strtolower(pathinfo($filename, PATHINFO_EXTENSION)); +} + +/** * Translate a string * * @return string |