Skip to content

Commit

Permalink
Show the different editions to the user. Used in the status call, on …
Browse files Browse the repository at this point in the history
…the personal settings page and in the updater to update to the next available version from the same edition.
  • Loading branch information
Frank Karlitschek committed Apr 1, 2012
1 parent 6bb48b2 commit 6545e48
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 2 deletions.
1 change: 1 addition & 0 deletions lib/updater.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ public static function check(){
$version['installed']=OC_Config::getValue('installedat');
$version['updated']=OC_Appconfig::getValue('core', 'lastupdatedat', OC_Config::getValue( 'lastupdatedat'));
$version['updatechannel']='stable';
$version['edition']=OC_Util::getEditionString();
$versionstring=implode('x',$version);

//fetch xml data from updater
Expand Down
8 changes: 8 additions & 0 deletions lib/util.php
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,14 @@ public static function getVersionString(){
return '3';
}

/**
* get the current installed edition of ownCloud. There is the community edition that just returns an empty string and the enterprise edition that returns "Enterprise".
* @return string
*/
public static function getEditionString(){
return '';
}

/**
* add a javascript file
*
Expand Down
2 changes: 1 addition & 1 deletion settings/templates/personal.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
};?>

<p class="personalblock">
<strong>ownCloud</strong> <?php echo(OC_Util::getVersionString()); ?><br />
<strong>ownCloud</strong> <?php echo(OC_Util::getVersionString()); ?> <?php echo(OC_Util::getEditionString()); ?><br />
developed by the <a href="http://ownCloud.org/credits" target="_blank">ownCloud community</a><br />
<?php echo(OC_Updater::ShowUpdatingHint()); ?><br />
<a href="http://gitorious.org/owncloud" target="_blank">source code</a> licensed freely under <a href="http://www.gnu.org/licenses/agpl-3.0.html" target="_blank">AGPL</a>
Expand Down
2 changes: 1 addition & 1 deletion status.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
require_once('lib/base.php');

if(OC_Config::getValue('installed')==1) $installed='true'; else $installed='false';
$values=array('installed'=>$installed,'version'=>implode('.',OC_Util::getVersion()),'versionstring'=>OC_Util::getVersionString());
$values=array('installed'=>$installed,'version'=>implode('.',OC_Util::getVersion()),'versionstring'=>OC_Util::getVersionString(),'edition'=>OC_Util::getEditionString());

echo(json_encode($values));

Expand Down

0 comments on commit 6545e48

Please sign in to comment.