diff --git a/lib/private/ocsclient.php b/lib/private/ocsclient.php
index 58636f806be694d361c66628295233e72e491cd7..e35556d92b80abc253ca7ed884c08a8dae13a3f6 100644
--- a/lib/private/ocsclient.php
+++ b/lib/private/ocsclient.php
@@ -36,7 +36,12 @@ class OC_OCSClient{
 	 * to set it in the config file or it will fallback to the default
 	 */
 	private static function getAppStoreURL() {
-		$url = OC_Config::getValue('appstoreurl', 'http://api.apps.owncloud.com/v1');
+		if(OC_Util::getEditionString()===''){
+			$default='http://api.apps.owncloud.com/v1';
+		}else{
+			$default='';
+		}
+		$url = OC_Config::getValue('appstoreurl', $default);
 		return($url);
 	}
 
diff --git a/lib/private/updater.php b/lib/private/updater.php
index df7332a96a97c24e79f72246d5477f0bae8ce89c..9827d8a8c12d7084e5f9eab3e10a63c560a0184c 100644
--- a/lib/private/updater.php
+++ b/lib/private/updater.php
@@ -56,7 +56,7 @@ class Updater extends BasicEmitter {
 		$version = \OC_Util::getVersion();
 		$version['installed'] = \OC_Appconfig::getValue('core', 'installedat');
 		$version['updated'] = \OC_Appconfig::getValue('core', 'lastupdatedat');
-		$version['updatechannel'] = 'stable';
+		$version['updatechannel'] = \OC_Util::getChannel(); 
 		$version['edition'] = \OC_Util::getEditionString();
 		$versionString = implode('x', $version);
 
diff --git a/lib/private/util.php b/lib/private/util.php
index 1fb867d3ac852ba1f62c73f0c0320fd6876da56d..ea2eb98d23c22de655d7c66ffc8329838ea1473a 100755
--- a/lib/private/util.php
+++ b/lib/private/util.php
@@ -106,9 +106,8 @@ class OC_Util {
 	 * @return array
 	 */
 	public static function getVersion() {
-		// hint: We only can count up. Reset minor/patchlevel when
-		// updating major/minor version number.
-		return array(5, 80, 07);
+		OC_Util::loadVersion();
+		return \OC::$server->getSession()->get('OC_Version');
 	}
 
 	/**
@@ -116,7 +115,8 @@ class OC_Util {
 	 * @return string
 	 */
 	public static function getVersionString() {
-		return '6.0 pre alpha';
+		OC_Util::loadVersion();
+		return \OC::$server->getSession()->get('OC_VersionString');
 	}
 
 	/**
@@ -126,7 +126,46 @@ class OC_Util {
 	 * @return string
 	 */
 	public static function getEditionString() {
-		return '';
+		OC_Util::loadVersion();
+		return \OC::$server->getSession()->get('OC_Edition');
+	}
+
+	/**
+	 * @description get the update channel of the current installed of ownCloud.
+	 * @return string
+	 */
+	public static function getChannel() {
+		OC_Util::loadVersion();
+		return \OC::$server->getSession()->get('OC_Channel');
+	}
+        
+	/**
+	 * @description get the build number of the current installed of ownCloud.
+	 * @return string
+	 */
+	public static function getBuild() {
+		OC_Util::loadVersion();
+		return \OC::$server->getSession()->get('OC_Build');
+	}
+
+	/**
+	 * @description load the version.php into the session as cache
+	 */
+	private static function loadVersion() {
+		if(!\OC::$server->getSession()->exists('OC_Version')) {
+			require 'version.php';
+			$session = \OC::$server->getSession();
+			/** @var $OC_Version string */
+			$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 */
+			$session->set('OC_Build', $OC_Build);
+		}
 	}
 
 	/**
diff --git a/version.php b/version.php
new file mode 100644
index 0000000000000000000000000000000000000000..eb2e9a4a68ba0305af3a915f7e968d87bf5aa253
--- /dev/null
+++ b/version.php
@@ -0,0 +1,17 @@
+<?php
+
+// We only can count up. The 4. digit is only for the internal patchlevel to trigger DB upgrades between betas, final and RCs. This is _not_ the public version number. Reset minor/patchlevel when updating major/minor version number.
+$OC_Version=array(5, 80, 8, 0);
+
+// The human radable string
+$OC_VersionString='6.0 pre alpha';
+
+// The ownCloud edition
+$OC_Edition='';
+
+// The ownCloud channel
+$OC_Channel='';
+
+// The build number
+$OC_Build='';
+