LDAP: prevent other configuration from being deleted when deleting the first one which has an empty prefix for historical reasons
This commit is contained in:
parent
2a7509ee50
commit
d88c6778ff
|
@ -118,10 +118,16 @@ class Helper {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$saveOtherConfigurations = '';
|
||||||
|
if(empty($prefix)) {
|
||||||
|
$saveOtherConfigurations = 'AND `Configkey` NOT LIKE \'s%\'';
|
||||||
|
}
|
||||||
|
|
||||||
$query = \OCP\DB::prepare('
|
$query = \OCP\DB::prepare('
|
||||||
DELETE
|
DELETE
|
||||||
FROM `*PREFIX*appconfig`
|
FROM `*PREFIX*appconfig`
|
||||||
WHERE `configkey` LIKE ?
|
WHERE `configkey` LIKE ?
|
||||||
|
'.$saveOtherConfigurations.'
|
||||||
AND `appid` = \'user_ldap\'
|
AND `appid` = \'user_ldap\'
|
||||||
AND `configkey` NOT IN (\'enabled\', \'installed_version\', \'types\', \'bgjUpdateGroupsLastRun\')
|
AND `configkey` NOT IN (\'enabled\', \'installed_version\', \'types\', \'bgjUpdateGroupsLastRun\')
|
||||||
');
|
');
|
||||||
|
|
Loading…
Reference in New Issue