Merge pull request #3565 from owncloud/fix_ldap_sqlite_n_js
Fix ldap sqlite n js
This commit is contained in:
commit
1656cc2e7c
|
@ -14,7 +14,7 @@ var LdapConfiguration = {
|
|||
|
||||
//deal with Checkboxes
|
||||
if($(elementID).is('input[type=checkbox]')) {
|
||||
if(configvalue === 1) {
|
||||
if(parseInt(configvalue) === 1) {
|
||||
$(elementID).attr('checked', 'checked');
|
||||
} else {
|
||||
$(elementID).removeAttr('checked');
|
||||
|
|
|
@ -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 New Issue