From 3dea2b95c67adfeaf8b9af062b6b586d2d845300 Mon Sep 17 00:00:00 2001 From: Frank Karlitschek Date: Thu, 25 Dec 2014 09:48:15 +0100 Subject: [PATCH 1/2] Automatically detect the edition based on the enterprise_key app. --- lib/private/util.php | 8 ++++++-- version.php | 3 --- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/lib/private/util.php b/lib/private/util.php index b97c068462..25fcc7d917 100644 --- a/lib/private/util.php +++ b/lib/private/util.php @@ -285,8 +285,12 @@ class OC_Util { * @return string */ public static function getEditionString() { - OC_Util::loadVersion(); - return \OC::$server->getSession()->get('OC_Edition'); + if (OC_App::isEnabled('enterprise_key')) { + return "Enterprise"; + } else { + return ""; + } + } /** diff --git a/version.php b/version.php index 4421a06bea..70ecf6c916 100644 --- a/version.php +++ b/version.php @@ -8,9 +8,6 @@ $OC_Version=array(7, 8, 1, 0); // The human readable string $OC_VersionString='8.0 pre alpha'; -// The ownCloud edition -$OC_Edition=''; - // The ownCloud channel $OC_Channel='git'; From 4a40e5699c27a4aee11205232e71e0b6b8fc8c96 Mon Sep 17 00:00:00 2001 From: Frank Karlitschek Date: Thu, 25 Dec 2014 11:36:41 +0100 Subject: [PATCH 2/2] remove Edition --- lib/private/util.php | 2 -- 1 file changed, 2 deletions(-) diff --git a/lib/private/util.php b/lib/private/util.php index 25fcc7d917..947b6471ea 100644 --- a/lib/private/util.php +++ b/lib/private/util.php @@ -325,8 +325,6 @@ class OC_Util { $session->set('OC_Version', $OC_Version); /** @var $OC_VersionString string */ $session->set('OC_VersionString', $OC_VersionString); - /** @var $OC_Edition string */ - $session->set('OC_Edition', $OC_Edition); /** @var $OC_Channel string */ $session->set('OC_Channel', $OC_Channel); /** @var $OC_Build string */