From 228f1788fa2e93d333849a471c3b236f69f90904 Mon Sep 17 00:00:00 2001 From: Thomas Mueller Date: Sun, 24 Nov 2013 21:26:34 +0100 Subject: [PATCH] add new function to generate the human readable version string based on version, channel and build number --- lib/private/util.php | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/lib/private/util.php b/lib/private/util.php index 426c5a025f..b5c5546da3 100755 --- a/lib/private/util.php +++ b/lib/private/util.php @@ -1111,4 +1111,17 @@ class OC_Util { $t = explode('/', $file); return array_pop($t); } + + /** + * A human readable string is generated based on version, channel and build number + * @return string + */ + public static function getHumanVersion() { + $version = OC_Util::getVersionString().' ('.OC_Util::getChannel().')'; + $build = OC_Util::getBuild(); + if(!empty($build) and OC_Util::getChannel() === 'daily') { + $version .= ' Build:' . $build; + } + return $version; + } }