Merge pull request #3565 from owncloud/fix_ldap_sqlite_n_js

Fix ldap sqlite n js
This commit is contained in:
blizzz 2013-05-31 12:17:46 -07:00
commit 1656cc2e7c
2 changed files with 8 additions and 2 deletions

View File

@ -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');

View File

@ -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)) {