diff --git a/lam/VERSION b/lam/VERSION new file mode 100644 index 00000000..cb29ffd0 --- /dev/null +++ b/lam/VERSION @@ -0,0 +1 @@ +0.5.alpha1 diff --git a/lam/lib/config.inc b/lam/lib/config.inc index 5b789060..ab5948cf 100644 --- a/lam/lib/config.inc +++ b/lam/lib/config.inc @@ -72,6 +72,26 @@ function getConfigProfiles() { return $ret; } +/** +* Returns the version number of this LAM installation. +* Format: .. +*
Major/minor version are always numbers, patch level may contain letters for inofficial releases only (e.g. 0.5.alpha1). +* +* @return string version number +*/ +function LAMVersion() { + $file = substr(__FILE__, 0, strlen(__FILE__) - 15) . "/VERSION"; + if (is_readable($file)) { + $handle = fopen($file, "r"); + if (!feof($handle)) { + return trim(fgets($handle, 20)); + } + } + // file was not readable + return '0.0.unknown'; +} + + /** * Prints a meta refresh page *