diff options
author | vincent-peugnet <v.peugnet@free.fr> | 2018-12-17 16:28:28 +0100 |
---|---|---|
committer | vincent-peugnet <v.peugnet@free.fr> | 2018-12-17 16:28:28 +0100 |
commit | 08edd92a2135d486603687b181979854b60a3bcc (patch) | |
tree | 8bd976d69b6f98e3aa88bef703e3bedfefe40cde /app/fn | |
parent | 1a7a60ea3efde53ac2c3b07ca914483cfc25a827 (diff) | |
download | wcms-08edd92a2135d486603687b181979854b60a3bcc.tar.gz wcms-08edd92a2135d486603687b181979854b60a3bcc.zip |
license and version info
Diffstat (limited to 'app/fn')
-rw-r--r-- | app/fn/fn.php | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/app/fn/fn.php b/app/fn/fn.php index 49db200..655562f 100644 --- a/app/fn/fn.php +++ b/app/fn/fn.php @@ -81,6 +81,17 @@ function idclean(string $input) } +function getversion() +{ + if(file_exists('composer.json')) { + $composer = json_decode(file_get_contents('composer.json'), true); + $version = $composer['version']; + } else { + $version = 'unknown'; + } + return $version; +} + function array_update($base, $new) |