From 3dea2b95c67adfeaf8b9af062b6b586d2d845300 Mon Sep 17 00:00:00 2001
From: Frank Karlitschek <frank@owncloud.org>
Date: Thu, 25 Dec 2014 09:48:15 +0100
Subject: [PATCH] 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 b97c0684629..25fcc7d9172 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 4421a06bea0..70ecf6c916a 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';
 
-- 
GitLab