aboutsummaryrefslogtreecommitdiffstats
path: root/apps/user_ldap
diff options
context:
space:
mode:
authorArthur Schiwon <blizzz@owncloud.com>2013-05-31 20:07:13 +0200
committerArthur Schiwon <blizzz@owncloud.com>2013-05-31 20:07:13 +0200
commit2ff9677cd17749767060f30dc55bfd66b22fcc26 (patch)
treefc5c93bb8c38f97be00295e5d84ec8f096c62b6f /apps/user_ldap
parentc49ee4d3e3d1a9597601243e4887b1d446047209 (diff)
downloadnextcloud-server-2ff9677cd17749767060f30dc55bfd66b22fcc26.tar.gz
nextcloud-server-2ff9677cd17749767060f30dc55bfd66b22fcc26.zip
LDAP: sqlite compatibility for emptyiing tables
Diffstat (limited to 'apps/user_ldap')
-rw-r--r--apps/user_ldap/lib/helper.php8
1 files changed, 7 insertions, 1 deletions
diff --git a/apps/user_ldap/lib/helper.php b/apps/user_ldap/lib/helper.php
index 07d13a806a6..10ed40ebd6a 100644
--- a/apps/user_ldap/lib/helper.php
+++ b/apps/user_ldap/lib/helper.php
@@ -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)) {