summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Mueller <thomas.mueller@tmit.eu>2013-11-24 21:26:34 +0100
committerThomas Mueller <thomas.mueller@tmit.eu>2013-11-24 21:26:34 +0100
commit228f1788fa2e93d333849a471c3b236f69f90904 (patch)
tree1030ff24208a13afb7f3a27100d6bb194501c3b2
parent77bb168007c9faa58793d4925374222b490e0dd9 (diff)
downloadnextcloud-server-228f1788fa2e93d333849a471c3b236f69f90904.tar.gz
nextcloud-server-228f1788fa2e93d333849a471c3b236f69f90904.zip
add new function to generate the human readable version string based on version, channel and build number
-rwxr-xr-xlib/private/util.php13
1 files changed, 13 insertions, 0 deletions
diff --git a/lib/private/util.php b/lib/private/util.php
index 426c5a025f3..b5c5546da35 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;
+ }
}