]> source.dussan.org Git - nextcloud-server.git/commitdiff
add new function to generate the human readable version string based on version,...
authorThomas Mueller <thomas.mueller@tmit.eu>
Sun, 24 Nov 2013 20:26:34 +0000 (21:26 +0100)
committerThomas Mueller <thomas.mueller@tmit.eu>
Sun, 24 Nov 2013 20:26:34 +0000 (21:26 +0100)
lib/private/util.php

index 426c5a025f3170f42cf6636829c223d7c0c6ef13..b5c5546da35b320833a1a63f935d07f75c98e670 100755 (executable)
@@ -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;
+       }
 }