]> source.dussan.org Git - nextcloud-server.git/commitdiff
Show the different editions to the user. Used in the status call, on the personal...
authorFrank Karlitschek <karlitschek@kde.org>
Sun, 1 Apr 2012 09:20:12 +0000 (11:20 +0200)
committerFrank Karlitschek <karlitschek@kde.org>
Sun, 1 Apr 2012 09:20:12 +0000 (11:20 +0200)
lib/updater.php
lib/util.php
settings/templates/personal.php
status.php

index 57623797ae5c7a74cf32c1a5b207bc2b91c719d8..196822ac35d42084979e8c5e08741fff7be7a0a8 100644 (file)
@@ -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
index 529b6d958fbcd0c8718d3472c9e2a7ac53a4d484..722b7404d0c4b8b3ed8d8e8e5eff3dee62ec9055 100644 (file)
@@ -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
         *
index 57731d979d9c29ab25665211f76e2b4cd1c6908c..d40da7eb773fca58d2bc870619f91a7856f73296 100644 (file)
@@ -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>
index 94c8cfce8423314f9ac437d82f223d3fca9f633e..81f339fa53f8f172a8196e057a77c8610d7c245c 100644 (file)
@@ -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));