diff options
author | Arthur Schiwon <blizzz@owncloud.com> | 2014-02-14 18:34:22 +0400 |
---|---|---|
committer | Arthur Schiwon <blizzz@owncloud.com> | 2014-02-20 19:25:50 +0400 |
commit | 3c9421381b9c57082ad49a562ae25eb09ab7047c (patch) | |
tree | fb3af5c1027b07dbf1aca564ac95f7d2471b3dd9 /apps | |
parent | 2d946d27666660b27e503cb940b4f952b109e87a (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.php | 6 |
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\') '); |