Merge pull request #6021 from owncloud/show_build

Show build number
This commit is contained in:
Thomas Müller 2013-11-24 15:01:11 -08:00
commit 1a69079139
4 changed files with 16 additions and 2 deletions

View File

@ -58,6 +58,7 @@ class Updater extends BasicEmitter {
$version['updated'] = \OC_Appconfig::getValue('core', 'lastupdatedat'); $version['updated'] = \OC_Appconfig::getValue('core', 'lastupdatedat');
$version['updatechannel'] = \OC_Util::getChannel(); $version['updatechannel'] = \OC_Util::getChannel();
$version['edition'] = \OC_Util::getEditionString(); $version['edition'] = \OC_Util::getEditionString();
$version['build'] = \OC_Util::getBuild();
$versionString = implode('x', $version); $versionString = implode('x', $version);
//fetch xml data from updater //fetch xml data from updater

View File

@ -1111,4 +1111,17 @@ class OC_Util {
$t = explode('/', $file); $t = explode('/', $file);
return array_pop($t); 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;
}
} }

View File

@ -264,7 +264,7 @@ if (!$_['internetconnectionworking']) {
<fieldset class="personalblock"> <fieldset class="personalblock">
<h2><?php p($l->t('Version'));?></h2> <h2><?php p($l->t('Version'));?></h2>
<strong><?php p($theme->getTitle()); ?></strong> <?php p(OC_Util::getVersionString().' ('.OC_Util::getChannel().')'); ?> <strong><?php p($theme->getTitle()); ?></strong> <?php p(OC_Util::getHumanVersion()) ?>
<?php if (OC_Util::getEditionString() === ''): ?> <?php if (OC_Util::getEditionString() === ''): ?>
<p> <p>
<?php print_unescaped($l->t('Developed by the <a href="http://ownCloud.org/contact" target="_blank">ownCloud community</a>, the <a href="https://github.com/owncloud" target="_blank">source code</a> is licensed under the <a href="http://www.gnu.org/licenses/agpl-3.0.html" target="_blank"><abbr title="Affero General Public License">AGPL</abbr></a>.')); ?> <?php print_unescaped($l->t('Developed by the <a href="http://ownCloud.org/contact" target="_blank">ownCloud community</a>, the <a href="https://github.com/owncloud" target="_blank">source code</a> is licensed under the <a href="http://www.gnu.org/licenses/agpl-3.0.html" target="_blank"><abbr title="Affero General Public License">AGPL</abbr></a>.')); ?>

View File

@ -167,7 +167,7 @@ if($_['passwordChangeSupported']) {
<fieldset class="personalblock"> <fieldset class="personalblock">
<h2><?php p($l->t('Version'));?></h2> <h2><?php p($l->t('Version'));?></h2>
<strong><?php p($theme->getName()); ?></strong> <?php p(OC_Util::getVersionString().' ('.OC_Util::getChannel().')'); ?><br /> <strong><?php p($theme->getName()); ?></strong> <?php p(OC_Util::getHumanVersion()) ?><br />
<?php if (OC_Util::getEditionString() === ''): ?> <?php if (OC_Util::getEditionString() === ''): ?>
<?php print_unescaped($l->t('Developed by the <a href="http://ownCloud.org/contact" target="_blank">ownCloud community</a>, the <a href="https://github.com/owncloud" target="_blank">source code</a> is licensed under the <a href="http://www.gnu.org/licenses/agpl-3.0.html" target="_blank"><abbr title="Affero General Public License">AGPL</abbr></a>.')); ?> <?php print_unescaped($l->t('Developed by the <a href="http://ownCloud.org/contact" target="_blank">ownCloud community</a>, the <a href="https://github.com/owncloud" target="_blank">source code</a> is licensed under the <a href="http://www.gnu.org/licenses/agpl-3.0.html" target="_blank"><abbr title="Affero General Public License">AGPL</abbr></a>.')); ?>
<?php endif; ?> <?php endif; ?>