Backport subset of #4179, re-established Oracle compatibility for LDAP

Conflicts:
	apps/user_ldap/lib/access.php
This commit is contained in:
Arthur Schiwon 2014-06-20 20:47:51 +02:00
parent d5819a5ecd
commit 93edacb357
2 changed files with 3 additions and 2 deletions

View File

@ -607,7 +607,7 @@ class Access extends LDAPUtility implements user\IUserTools {
$sqlAdjustment = '';
$dbType = \OCP\Config::getSystemValue('dbtype');
if($dbType === 'mysql') {
if($dbType === 'mysql' || $dbType == 'oci') {
$sqlAdjustment = 'FROM DUAL';
}

View File

@ -159,7 +159,8 @@ class Helper {
return false;
}
if(strpos(\OCP\Config::getSystemValue('dbtype'), 'sqlite') !== false) {
$dbtype = \OCP\Config::getSystemValue('dbtype');
if(strpos($dbtype, 'sqlite') !== false || $dbtype === 'oci') {
$query = \OCP\DB::prepare('DELETE FROM '.$table);
} else {
$query = \OCP\DB::prepare('TRUNCATE '.$table);