Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
authorArthur Schiwon <blizzz@owncloud.com>2014-02-14 18:34:22 +0400
committerArthur Schiwon <blizzz@owncloud.com>2014-02-20 19:25:50 +0400
commit3c9421381b9c57082ad49a562ae25eb09ab7047c (patch)
treefb3af5c1027b07dbf1aca564ac95f7d2471b3dd9 /apps
parent2d946d27666660b27e503cb940b4f952b109e87a (diff)
LDAP: prevent other configuration from being deleted when deleting the first one which has an empty prefix for historical reasons
Diffstat (limited to 'apps')
-rw-r--r--apps/user_ldap/lib/helper.php6
1 files changed, 6 insertions, 0 deletions
diff --git a/apps/user_ldap/lib/helper.php b/apps/user_ldap/lib/helper.php
index 9727d847d27..7de7fe8667f 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\')
');