From a11192bab3bcf5751ac29b2c7fdf5cdd529345fc Mon Sep 17 00:00:00 2001 From: Frank Karlitschek Date: Sun, 24 Nov 2013 16:45:06 +0100 Subject: [PATCH 1/5] send the build number too to push the next daily build. This is needed for the new daily build update channel --- lib/private/updater.php | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/private/updater.php b/lib/private/updater.php index 9827d8a8c1..a1b07c5a24 100644 --- a/lib/private/updater.php +++ b/lib/private/updater.php @@ -58,6 +58,7 @@ class Updater extends BasicEmitter { $version['updated'] = \OC_Appconfig::getValue('core', 'lastupdatedat'); $version['updatechannel'] = \OC_Util::getChannel(); $version['edition'] = \OC_Util::getEditionString(); + $version['build'] = \OC_Util::getBuild(); $versionString = implode('x', $version); //fetch xml data from updater From 22e39baf77b5a16fa69c7f40c689b79dcdef9f75 Mon Sep 17 00:00:00 2001 From: Frank Karlitschek Date: Sun, 24 Nov 2013 16:46:07 +0100 Subject: [PATCH 2/5] show the build number if on the daily build update channel --- settings/templates/admin.php | 2 +- settings/templates/personal.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/settings/templates/admin.php b/settings/templates/admin.php index f655a14be8..0e13f2f46b 100644 --- a/settings/templates/admin.php +++ b/settings/templates/admin.php @@ -264,7 +264,7 @@ if (!$_['internetconnectionworking']) {

t('Version'));?>

- getTitle()); ?> + getTitle()); ?>

t('Developed by the ownCloud community, the source code is licensed under the AGPL.')); ?> diff --git a/settings/templates/personal.php b/settings/templates/personal.php index 9d21e18e73..97b590a96e 100644 --- a/settings/templates/personal.php +++ b/settings/templates/personal.php @@ -167,7 +167,7 @@ if($_['passwordChangeSupported']) {

t('Version'));?>

- getName()); ?>
+ getName()); ?>
t('Developed by the ownCloud community, the source code is licensed under the AGPL.')); ?> From 77bb168007c9faa58793d4925374222b490e0dd9 Mon Sep 17 00:00:00 2001 From: Frank Karlitschek Date: Sun, 24 Nov 2013 17:17:10 +0100 Subject: [PATCH 3/5] replace echo with p --- settings/templates/admin.php | 2 +- settings/templates/personal.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/settings/templates/admin.php b/settings/templates/admin.php index 0e13f2f46b..de723e4cad 100644 --- a/settings/templates/admin.php +++ b/settings/templates/admin.php @@ -264,7 +264,7 @@ if (!$_['internetconnectionworking']) {

t('Version'));?>

- getTitle()); ?> + getTitle()); ?>

t('Developed by the ownCloud community, the source code is licensed under the AGPL.')); ?> diff --git a/settings/templates/personal.php b/settings/templates/personal.php index 97b590a96e..a8f2fa8a55 100644 --- a/settings/templates/personal.php +++ b/settings/templates/personal.php @@ -167,7 +167,7 @@ if($_['passwordChangeSupported']) {

t('Version'));?>

- getName()); ?>
+ getName()); ?>
t('Developed by the ownCloud community, the source code is licensed under the AGPL.')); ?> From 228f1788fa2e93d333849a471c3b236f69f90904 Mon Sep 17 00:00:00 2001 From: Thomas Mueller Date: Sun, 24 Nov 2013 21:26:34 +0100 Subject: [PATCH 4/5] 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; + } } From f6df4b349f6233b56c6f193d132ce04fb0dec47b Mon Sep 17 00:00:00 2001 From: Thomas Mueller Date: Sun, 24 Nov 2013 21:27:32 +0100 Subject: [PATCH 5/5] remove logic from template and fix syntax error --- settings/templates/admin.php | 2 +- settings/templates/personal.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/settings/templates/admin.php b/settings/templates/admin.php index de723e4cad..253a7ff5f5 100644 --- a/settings/templates/admin.php +++ b/settings/templates/admin.php @@ -264,7 +264,7 @@ if (!$_['internetconnectionworking']) {

t('Version'));?>

- getTitle()); ?> + getTitle()); ?>

t('Developed by the ownCloud community, the source code is licensed under the AGPL.')); ?> diff --git a/settings/templates/personal.php b/settings/templates/personal.php index a8f2fa8a55..2d8652aed7 100644 --- a/settings/templates/personal.php +++ b/settings/templates/personal.php @@ -167,7 +167,7 @@ if($_['passwordChangeSupported']) {

t('Version'));?>

- getName()); ?>
+ getName()); ?>
t('Developed by the ownCloud community, the source code is licensed under the AGPL.')); ?>