add new function to generate the human readable version string based on version, channel and build number

This commit is contained in:
Thomas Mueller 2013-11-24 21:26:34 +01:00
parent 77bb168007
commit 228f1788fa
1 changed files with 13 additions and 0 deletions

View File

@ -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;
}
}