diff --git a/apps/calendar/appinfo/update.php b/apps/calendar/appinfo/update.php
old mode 100644
new mode 100755
index 375816a403ebc4ce6537fd7d14143b89f7a1bed6..9f52f91392dc1e6a3616bed5f49d7463d377e650
--- a/apps/calendar/appinfo/update.php
+++ b/apps/calendar/appinfo/update.php
@@ -1,6 +1,6 @@
 <?php
 
-$installedVersion=OC_Appconfig::getValue('calendar', 'installed_version');
+$installedVersion=OCP\Config::getAppValue('calendar', 'installed_version');
 if (version_compare($installedVersion, '0.2.1', '<')) {
 	$stmt = OC_DB::prepare( 'SELECT id, calendarcolor FROM *PREFIX*calendar_calendars WHERE calendarcolor IS NOT NULL' );
 	$result = $stmt->execute();
diff --git a/apps/external/ajax/setsites.php b/apps/external/ajax/setsites.php
index 5f36b3d13d55b4c68fe523133b3c075ca75ad111..c14daa258c12f914783123b0b52d9003380d67f0 100755
--- a/apps/external/ajax/setsites.php
+++ b/apps/external/ajax/setsites.php
@@ -19,7 +19,7 @@ for ($i = 0; $i < sizeof($_POST['site_name']); $i++) {
 if (sizeof($sites) == 0)
 	OC_Appconfig::deleteKey('external', 'sites');
 else
-	OC_Appconfig::setValue('external', 'sites', json_encode($sites));
+	OCP\Config::setAppValue('external', 'sites', json_encode($sites));
 
 echo 'true';
 ?>
diff --git a/apps/external/lib/external.php b/apps/external/lib/external.php
old mode 100644
new mode 100755
index 9dd32321135d3030ead9cfd37f02a1b1257572d1..9fff5d5569a37b0a1bb92d5ad4865fe386cfbc99
--- a/apps/external/lib/external.php
+++ b/apps/external/lib/external.php
@@ -24,7 +24,7 @@
 class OC_External {
 
 	public static function getSites() {
-		if (($sites = json_decode(OC_Appconfig::getValue("external", "sites", ''))) != NULL) {
+		if (($sites = json_decode(OCP\Config::getAppValue("external", "sites", ''))) != NULL) {
 			return $sites;	
 		}
 
diff --git a/apps/files_encryption/lib/proxy.php b/apps/files_encryption/lib/proxy.php
index ba357f235026827b923bea571b34a793bde0ccac..06f963fc98173626155420e923779e9effbf712b 100755
--- a/apps/files_encryption/lib/proxy.php
+++ b/apps/files_encryption/lib/proxy.php
@@ -36,13 +36,13 @@ class OC_FileProxy_Encryption extends OC_FileProxy{
 	 */
 	private static function shouldEncrypt($path){
 		if(is_null(self::$enableEncryption)){
-			self::$enableEncryption=(OC_Appconfig::getValue('files_encryption','enable_encryption','true')=='true');
+			self::$enableEncryption=(OCP\Config::getAppValue('files_encryption','enable_encryption','true')=='true');
 		}
 		if(!self::$enableEncryption){
 			return false;
 		}
 		if(is_null(self::$blackList)){
-			self::$blackList=explode(',',OC_Appconfig::getValue('files_encryption','type_blacklist','jpg,png,jpeg,avi,mpg,mpeg,mkv,mp3,oga,ogv,ogg'));
+			self::$blackList=explode(',',OCP\Config::getAppValue('files_encryption','type_blacklist','jpg,png,jpeg,avi,mpg,mpeg,mkv,mp3,oga,ogv,ogg'));
 		}
 		if(self::isEncrypted($path)){
 			return true;
diff --git a/apps/files_encryption/settings.php b/apps/files_encryption/settings.php
index facd6580f00afaaa6b8a5445ddd8355b095cc251..aed9079529c1a67dc5137ee90db1391c4d70448a 100755
--- a/apps/files_encryption/settings.php
+++ b/apps/files_encryption/settings.php
@@ -7,8 +7,8 @@
  */
 
 $tmpl = new OC_Template( 'files_encryption', 'settings');
-$blackList=explode(',',OC_Appconfig::getValue('files_encryption','type_blacklist','jpg,png,jpeg,avi,mpg,mpeg,mkv,mp3,oga,ogv,ogg'));
-$enabled=(OC_Appconfig::getValue('files_encryption','enable_encryption','true')=='true');
+$blackList=explode(',',OCP\Config::getAppValue('files_encryption','type_blacklist','jpg,png,jpeg,avi,mpg,mpeg,mkv,mp3,oga,ogv,ogg'));
+$enabled=(OCP\Config::getAppValue('files_encryption','enable_encryption','true')=='true');
 $tmpl->assign('blacklist',$blackList);
 $tmpl->assign('encryption_enabled',$enabled);
 
diff --git a/apps/files_sharing/ajax/toggleresharing.php b/apps/files_sharing/ajax/toggleresharing.php
old mode 100644
new mode 100755
index bd4d23ff79fc6b6b0305965b1b53f117776d4689..853b2bd5349283248168068d80c614be3fdbe2fe
--- a/apps/files_sharing/ajax/toggleresharing.php
+++ b/apps/files_sharing/ajax/toggleresharing.php
@@ -3,9 +3,9 @@
 OC_JSON::checkAppEnabled('files_sharing');
 OC_JSON::checkAdminUser();
 if ($_POST['resharing'] == true) {
-	OC_Appconfig::setValue('files_sharing', 'resharing', 'yes');
+	OCP\Config::setAppValue('files_sharing', 'resharing', 'yes');
 } else {
-	OC_Appconfig::setValue('files_sharing', 'resharing', 'no');
+	OCP\Config::setAppValue('files_sharing', 'resharing', 'no');
 }
 
 ?>
diff --git a/apps/files_sharing/appinfo/app.php b/apps/files_sharing/appinfo/app.php
index 15f72ef0895a939f97662fc64c703cc11c69bd6a..f80bdb9e195085c3ca7f9a96a3eebbe0805dc275 100755
--- a/apps/files_sharing/appinfo/app.php
+++ b/apps/files_sharing/appinfo/app.php
@@ -11,7 +11,7 @@ OC_Hook::connect('OC_User', 'post_deleteUser', 'OC_Share', 'removeUser');
 OC_Hook::connect('OC_User', 'post_addToGroup', 'OC_Share', 'addToGroupShare');
 OC_Hook::connect('OC_User', 'post_removeFromGroup', 'OC_Share', 'removeFromGroupShare');
 $dir = isset($_GET['dir']) ? $_GET['dir'] : '/';
-if ($dir != '/Shared' || OC_Appconfig::getValue('files_sharing', 'resharing', 'yes') == 'yes') {
+if ($dir != '/Shared' || OCP\Config::getAppValue('files_sharing', 'resharing', 'yes') == 'yes') {
 	OCP\Util::addscript("files_sharing", "share");
 }
 OCP\Util::addscript("3rdparty", "chosen/chosen.jquery.min");
diff --git a/apps/files_sharing/settings.php b/apps/files_sharing/settings.php
index 26c8df682bbb3cda1ea599ac62231890f80a5fcd..a7bdf7b91957da07a08f439f4ba15f4b79b27764 100755
--- a/apps/files_sharing/settings.php
+++ b/apps/files_sharing/settings.php
@@ -3,7 +3,7 @@
 OCP\User::checkAdminUser();
 OCP\Util::addscript('files_sharing', 'settings');
 $tmpl = new OC_Template('files_sharing', 'settings');
-$tmpl->assign('allowResharing', OC_Appconfig::getValue('files_sharing', 'resharing', 'yes'));
+$tmpl->assign('allowResharing', OCP\Config::getAppValue('files_sharing', 'resharing', 'yes'));
 return $tmpl->fetchPage();
 
 ?>
\ No newline at end of file
diff --git a/apps/user_ldap/group_ldap.php b/apps/user_ldap/group_ldap.php
old mode 100644
new mode 100755
index 7773968e208678f896032c256231d1d10ef18392..a38c1b9b78bb05dba70982455a66116e8cf2ea51
--- a/apps/user_ldap/group_ldap.php
+++ b/apps/user_ldap/group_ldap.php
@@ -26,7 +26,7 @@ class OC_GROUP_LDAP extends OC_Group_Backend {
 	protected $ldapGroupFilter;
 
 	public function __construct() {
-		$this->ldapGroupFilter      = OC_Appconfig::getValue('user_ldap', 'ldap_group_filter', '(objectClass=posixGroup)');
+		$this->ldapGroupFilter      = OCP\Config::getAppValue('user_ldap', 'ldap_group_filter', '(objectClass=posixGroup)');
 	}
 
 	/**
diff --git a/apps/user_ldap/lib_ldap.php b/apps/user_ldap/lib_ldap.php
index 327f6958ebfceb33fe6066af9bdebdc93c55c633..e5b935bfb33d98be259e75e3a57a9861517a8a04 100755
--- a/apps/user_ldap/lib_ldap.php
+++ b/apps/user_ldap/lib_ldap.php
@@ -539,18 +539,18 @@ class OC_LDAP {
 	 */
 	static private function readConfiguration() {
 		if(!self::$configured) {
-			self::$ldapHost             = OC_Appconfig::getValue('user_ldap', 'ldap_host', '');
-			self::$ldapPort             = OC_Appconfig::getValue('user_ldap', 'ldap_port', OC_USER_BACKEND_LDAP_DEFAULT_PORT);
-			self::$ldapAgentName        = OC_Appconfig::getValue('user_ldap', 'ldap_dn','');
-			self::$ldapAgentPassword    = OC_Appconfig::getValue('user_ldap', 'ldap_password','');
-			self::$ldapBase             = OC_Appconfig::getValue('user_ldap', 'ldap_base', '');
-			self::$ldapBaseUsers        = OC_Appconfig::getValue('user_ldap', 'ldap_base_users',self::$ldapBase);
-			self::$ldapBaseGroups       = OC_Appconfig::getValue('user_ldap', 'ldap_base_groups', self::$ldapBase);
-			self::$ldapTLS              = OC_Appconfig::getValue('user_ldap', 'ldap_tls',0);
-			self::$ldapNoCase           = OC_Appconfig::getValue('user_ldap', 'ldap_nocase', 0);
-			self::$ldapUserDisplayName  = OC_Appconfig::getValue('user_ldap', 'ldap_display_name', OC_USER_BACKEND_LDAP_DEFAULT_DISPLAY_NAME);
-			self::$ldapUserFilter       = OC_Appconfig::getValue('user_ldap', 'ldap_userlist_filter','objectClass=person');
-			self::$ldapGroupDisplayName = OC_Appconfig::getValue('user_ldap', 'ldap_group_display_name', LDAP_GROUP_DISPLAY_NAME_ATTR);
+			self::$ldapHost             = OCP\Config::getAppValue('user_ldap', 'ldap_host', '');
+			self::$ldapPort             = OCP\Config::getAppValue('user_ldap', 'ldap_port', OC_USER_BACKEND_LDAP_DEFAULT_PORT);
+			self::$ldapAgentName        = OCP\Config::getAppValue('user_ldap', 'ldap_dn','');
+			self::$ldapAgentPassword    = OCP\Config::getAppValue('user_ldap', 'ldap_password','');
+			self::$ldapBase             = OCP\Config::getAppValue('user_ldap', 'ldap_base', '');
+			self::$ldapBaseUsers        = OCP\Config::getAppValue('user_ldap', 'ldap_base_users',self::$ldapBase);
+			self::$ldapBaseGroups       = OCP\Config::getAppValue('user_ldap', 'ldap_base_groups', self::$ldapBase);
+			self::$ldapTLS              = OCP\Config::getAppValue('user_ldap', 'ldap_tls',0);
+			self::$ldapNoCase           = OCP\Config::getAppValue('user_ldap', 'ldap_nocase', 0);
+			self::$ldapUserDisplayName  = OCP\Config::getAppValue('user_ldap', 'ldap_display_name', OC_USER_BACKEND_LDAP_DEFAULT_DISPLAY_NAME);
+			self::$ldapUserFilter       = OCP\Config::getAppValue('user_ldap', 'ldap_userlist_filter','objectClass=person');
+			self::$ldapGroupDisplayName = OCP\Config::getAppValue('user_ldap', 'ldap_group_display_name', LDAP_GROUP_DISPLAY_NAME_ATTR);
 
 			if(
 				   !empty(self::$ldapHost)
diff --git a/apps/user_ldap/settings.php b/apps/user_ldap/settings.php
index 40d333a057f45ca48fef5503c220ccc3b11c4223..566f058e658a3bee7e7d16bc2b7ea74cf97ad9a5 100755
--- a/apps/user_ldap/settings.php
+++ b/apps/user_ldap/settings.php
@@ -28,14 +28,14 @@ OCP\Util::addStyle('user_ldap', 'settings');
 if ($_POST) {
 	foreach($params as $param){
 		if(isset($_POST[$param])){
-			OC_Appconfig::setValue('user_ldap', $param, $_POST[$param]);
+			OCP\Config::setAppValue('user_ldap', $param, $_POST[$param]);
 		}
 		elseif('ldap_tls' == $param) {
 			// unchecked checkboxes are not included in the post paramters
-				OC_Appconfig::setValue('user_ldap', $param, 0);
+				OCP\Config::setAppValue('user_ldap', $param, 0);
 		}
 		elseif('ldap_nocase' == $param) {
-			OC_Appconfig::setValue('user_ldap', $param, 0);
+			OCP\Config::setAppValue('user_ldap', $param, 0);
 		}
 
 	}
@@ -44,12 +44,12 @@ if ($_POST) {
 // fill template
 $tmpl = new OC_Template( 'user_ldap', 'settings');
 foreach($params as $param){
-		$value = OC_Appconfig::getValue('user_ldap', $param,'');
+		$value = OCP\Config::getAppValue('user_ldap', $param,'');
 		$tmpl->assign($param, $value);
 }
 
 // settings with default values
-$tmpl->assign( 'ldap_port', OC_Appconfig::getValue('user_ldap', 'ldap_port', OC_USER_BACKEND_LDAP_DEFAULT_PORT));
-$tmpl->assign( 'ldap_display_name', OC_Appconfig::getValue('user_ldap', 'ldap_display_name', OC_USER_BACKEND_LDAP_DEFAULT_DISPLAY_NAME));
+$tmpl->assign( 'ldap_port', OCP\Config::getAppValue('user_ldap', 'ldap_port', OC_USER_BACKEND_LDAP_DEFAULT_PORT));
+$tmpl->assign( 'ldap_display_name', OCP\Config::getAppValue('user_ldap', 'ldap_display_name', OC_USER_BACKEND_LDAP_DEFAULT_DISPLAY_NAME));
 
 return $tmpl->fetchPage();
diff --git a/apps/user_ldap/user_ldap.php b/apps/user_ldap/user_ldap.php
index 1e454ab682fd2da07d1543249ab961a51fffbf23..40cf1db67ce974ccb0794e8caf2766f5fe925ded 100755
--- a/apps/user_ldap/user_ldap.php
+++ b/apps/user_ldap/user_ldap.php
@@ -45,19 +45,19 @@ class OC_USER_LDAP extends OC_User_Backend {
 	protected $ldap_dc = false;
 
 	function __construct() {
-		$this->ldap_host = OC_Appconfig::getValue('user_ldap', 'ldap_host','');
-		$this->ldap_port = OC_Appconfig::getValue('user_ldap', 'ldap_port', OC_USER_BACKEND_LDAP_DEFAULT_PORT	);
-		$this->ldap_dn = OC_Appconfig::getValue('user_ldap', 'ldap_dn','');
-		$this->ldap_password = OC_Appconfig::getValue('user_ldap', 'ldap_password','');
-		$this->ldap_base = OC_Appconfig::getValue('user_ldap', 'ldap_base','');
-		$this->ldap_login_filter = OC_Appconfig::getValue('user_ldap', 'ldap_login_filter','');
-		$this->ldap_userlist_filter = OC_Appconfig::getValue('user_ldap', 'ldap_userlist_filter','objectClass=person');
-		$this->ldap_tls = OC_Appconfig::getValue('user_ldap', 'ldap_tls', 0);
-		$this->ldap_nocase = OC_Appconfig::getValue('user_ldap', 'ldap_nocase', 0);
-		$this->ldap_display_name = OC_Appconfig::getValue('user_ldap', 'ldap_display_name', OC_USER_BACKEND_LDAP_DEFAULT_DISPLAY_NAME);
-		$this->ldap_quota_attr = OC_Appconfig::getValue('user_ldap', 'ldap_quota_attr','');
-		$this->ldap_quota_def = OC_Appconfig::getValue('user_ldap', 'ldap_quota_def','');
-		$this->ldap_email_attr = OC_Appconfig::getValue('user_ldap', 'ldap_email_attr','');
+		$this->ldap_host = OCP\Config::getAppValue('user_ldap', 'ldap_host','');
+		$this->ldap_port = OCP\Config::getAppValue('user_ldap', 'ldap_port', OC_USER_BACKEND_LDAP_DEFAULT_PORT	);
+		$this->ldap_dn = OCP\Config::getAppValue('user_ldap', 'ldap_dn','');
+		$this->ldap_password = OCP\Config::getAppValue('user_ldap', 'ldap_password','');
+		$this->ldap_base = OCP\Config::getAppValue('user_ldap', 'ldap_base','');
+		$this->ldap_login_filter = OCP\Config::getAppValue('user_ldap', 'ldap_login_filter','');
+		$this->ldap_userlist_filter = OCP\Config::getAppValue('user_ldap', 'ldap_userlist_filter','objectClass=person');
+		$this->ldap_tls = OCP\Config::getAppValue('user_ldap', 'ldap_tls', 0);
+		$this->ldap_nocase = OCP\Config::getAppValue('user_ldap', 'ldap_nocase', 0);
+		$this->ldap_display_name = OCP\Config::getAppValue('user_ldap', 'ldap_display_name', OC_USER_BACKEND_LDAP_DEFAULT_DISPLAY_NAME);
+		$this->ldap_quota_attr = OCP\Config::getAppValue('user_ldap', 'ldap_quota_attr','');
+		$this->ldap_quota_def = OCP\Config::getAppValue('user_ldap', 'ldap_quota_def','');
+		$this->ldap_email_attr = OCP\Config::getAppValue('user_ldap', 'ldap_email_attr','');
 
 		if( !empty($this->ldap_host)
 			&& !empty($this->ldap_port)
diff --git a/lib/public/config.php b/lib/public/config.php
index de9d163624b9dade7d581e558d9b0da5c1134741..cbc7d916cf4f942b581acd9b8c9d06117d0a0fbe 100644
--- a/lib/public/config.php
+++ b/lib/public/config.php
@@ -63,6 +63,34 @@ class Config {
 	}
 
 
+        /**
+         * @brief Gets the config value
+         * @param $app app
+         * @param $key key
+         * @param $default = null, default value if the key does not exist
+         * @returns the value or $default
+         *
+         * This function gets a value from the appconfig table. If the key does
+         * not exist the default value will be returnes
+         */
+        public static function getAppValue( $app, $key, $default = null ){
+		return(\OC_Appconfig::getValue( $app, $key, $default ));
+	}
+
+
+        /**
+         * @brief sets a value in the appconfig
+         * @param $app app
+         * @param $key key
+         * @param $value value
+         * @returns true/false
+         *
+         * Sets a value. If the key did not exist before it will be created.
+         */
+        public static function setAppValue( $app, $key, $value ){
+		return(\OC_Appconfig::setValue( $app, $key, $value ));
+	}
+
 
 
 }