mirror of
https://github.com/nextcloud/server.git
synced 2026-04-22 06:37:56 -04:00
LDAP: sqlite compatibility for emptyiing tables
This commit is contained in:
parent
c49ee4d3e3
commit
2ff9677cd1
1 changed files with 7 additions and 1 deletions
|
|
@ -118,7 +118,13 @@ class Helper {
|
|||
return false;
|
||||
}
|
||||
|
||||
$query = \OCP\DB::prepare('TRUNCATE '.$table);
|
||||
if(strpos(\OCP\Config::getSystemValue('dbtype'), 'sqlite') !== false) {
|
||||
$query = \OCP\DB::prepare('DELETE FROM '.$table);
|
||||
} else {
|
||||
$query = \OCP\DB::prepare('TRUNCATE '.$table);
|
||||
}
|
||||
|
||||
|
||||
$res = $query->execute();
|
||||
|
||||
if(\OCP\DB::isError($res)) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue