From 6545e4878715c10d85a72b1cdb3f7cef73d7e383 Mon Sep 17 00:00:00 2001 From: Frank Karlitschek Date: Sun, 1 Apr 2012 11:20:12 +0200 Subject: [PATCH] Show the different editions to the user. Used in the status call, on the personal settings page and in the updater to update to the next available version from the same edition. --- lib/updater.php | 1 + lib/util.php | 8 ++++++++ settings/templates/personal.php | 2 +- status.php | 2 +- 4 files changed, 11 insertions(+), 2 deletions(-) diff --git a/lib/updater.php b/lib/updater.php index 57623797ae5..196822ac35d 100644 --- a/lib/updater.php +++ b/lib/updater.php @@ -36,6 +36,7 @@ class OC_Updater{ $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 diff --git a/lib/util.php b/lib/util.php index 529b6d958fb..722b7404d0c 100644 --- a/lib/util.php +++ b/lib/util.php @@ -77,6 +77,14 @@ class OC_Util { 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 * diff --git a/settings/templates/personal.php b/settings/templates/personal.php index 57731d979d9..d40da7eb773 100644 --- a/settings/templates/personal.php +++ b/settings/templates/personal.php @@ -50,7 +50,7 @@ };?>

- ownCloud
+ ownCloud
developed by the ownCloud community

source code licensed freely under AGPL diff --git a/status.php b/status.php index 94c8cfce842..81f339fa53f 100644 --- a/status.php +++ b/status.php @@ -26,7 +26,7 @@ $RUNTIME_NOAPPS = TRUE; //no apps, yet 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)); -- 2.39.5