[Pkg-owncloud-commits] [owncloud] 113/145: LDAP: prevent other configuration from being deleted when deleting the first one which has an empty prefix for historical reasons

David Prévot taffit at moszumanska.debian.org
Wed Feb 26 16:27:46 UTC 2014


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to branch master
in repository owncloud.

commit 3c9421381b9c57082ad49a562ae25eb09ab7047c
Author: Arthur Schiwon <blizzz at owncloud.com>
Date:   Fri Feb 14 15:34:22 2014 +0100

    LDAP: prevent other configuration from being deleted when deleting the first one which has an empty prefix for historical reasons
---
 apps/user_ldap/lib/helper.php | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/apps/user_ldap/lib/helper.php b/apps/user_ldap/lib/helper.php
index 9727d84..7de7fe8 100644
--- a/apps/user_ldap/lib/helper.php
+++ b/apps/user_ldap/lib/helper.php
@@ -118,10 +118,16 @@ class Helper {
 			return false;
 		}
 
+		$saveOtherConfigurations = '';
+		if(empty($prefix)) {
+			$saveOtherConfigurations = 'AND `Configkey` NOT LIKE \'s%\'';
+		}
+
 		$query = \OCP\DB::prepare('
 			DELETE
 			FROM `*PREFIX*appconfig`
 			WHERE `configkey` LIKE ?
+				'.$saveOtherConfigurations.'
 				AND `appid` = \'user_ldap\'
 				AND `configkey` NOT IN (\'enabled\', \'installed_version\', \'types\', \'bgjUpdateGroupsLastRun\')
 		');

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud.git



More information about the Pkg-owncloud-commits mailing list