diff options
author | Minteck <contact@minteck.org> | 2022-04-14 16:55:43 +0200 |
---|---|---|
committer | Minteck <contact@minteck.org> | 2022-04-14 16:55:43 +0200 |
commit | 3c570954b0cc0d358aa00ab4cae4e91a2bb3a3da (patch) | |
tree | fe2d7c0d37206660fad4973fad85beb087203e11 /includes/functions.php | |
parent | 30f3e751c58578443604713670a90f6a30d2340f (diff) | |
download | ember-3c570954b0cc0d358aa00ab4cae4e91a2bb3a3da.tar.gz ember-3c570954b0cc0d358aa00ab4cae4e91a2bb3a3da.tar.bz2 ember-3c570954b0cc0d358aa00ab4cae4e91a2bb3a3da.zip |
Rewrite
Diffstat (limited to 'includes/functions.php')
-rw-r--r-- | includes/functions.php | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/includes/functions.php b/includes/functions.php new file mode 100644 index 0000000..470a740 --- /dev/null +++ b/includes/functions.php @@ -0,0 +1,11 @@ +<?php + +function version() { + if (file_exists($_SERVER['DOCUMENT_ROOT'] . "/.version")) { + return substr(trim(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/.version")), 0, 8); + } else if (file_exists($_SERVER['DOCUMENT_ROOT'] . "/.git/refs/heads/trunk")) { + return substr(trim(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/.git/refs/heads/trunk")), 0, 8); + } else { + return "trunk"; + } +}
\ No newline at end of file |