diff options
author | Arthur Schiwon <blizzz@owncloud.com> | 2014-02-14 15:34:22 +0100 |
---|---|---|
committer | Arthur Schiwon <blizzz@owncloud.com> | 2014-02-14 15:34:22 +0100 |
commit | d88c6778ff10ae6b0e5b2d40e56ec540a4e9d535 (patch) | |
tree | b64a15d72cf581a78794a1622c021da112780ecf /apps/user_ldap/lib/helper.php | |
parent | 2a7509ee50b3d16392c54c44cad003e8c867e349 (diff) | |
download | nextcloud-server-d88c6778ff10ae6b0e5b2d40e56ec540a4e9d535.tar.gz nextcloud-server-d88c6778ff10ae6b0e5b2d40e56ec540a4e9d535.zip |
LDAP: prevent other configuration from being deleted when deleting the first one which has an empty prefix for historical reasons
Diffstat (limited to 'apps/user_ldap/lib/helper.php')
-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\') '); |