[Pkg-owncloud-commits] [owncloud] 12/21: Backport subset of #4179, re-established Oracle compatibility for LDAP
David Prévot
taffit at moszumanska.debian.org
Sat Jun 28 18:44:56 UTC 2014
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to branch 6.0
in repository owncloud.
commit 6eb39f21942594298517e0570149e14ff0a24058
Author: Arthur Schiwon <blizzz at owncloud.com>
Date: Fri Jun 20 20:47:51 2014 +0200
Backport subset of #4179, re-established Oracle compatibility for LDAP
---
apps/user_ldap/lib/access.php | 4 ++--
apps/user_ldap/lib/helper.php | 3 ++-
2 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/apps/user_ldap/lib/access.php b/apps/user_ldap/lib/access.php
index 5a5f2d3..1efa1aa 100644
--- a/apps/user_ldap/lib/access.php
+++ b/apps/user_ldap/lib/access.php
@@ -638,7 +638,7 @@ class Access extends LDAPUtility {
$sqlAdjustment = '';
$dbtype = \OCP\Config::getSystemValue('dbtype');
- if($dbtype === 'mysql') {
+ if($dbtype === 'mysql' || $dbtype == 'oci') {
$sqlAdjustment = 'FROM DUAL';
}
@@ -866,7 +866,7 @@ class Access extends LDAPUtility {
private function countEntriesInSearchResults($searchResults, $limit,
&$hasHitLimit) {
$cr = $this->connection->getConnectionResource();
- $count = 0;
+ $counter = 0;
foreach($searchResults as $res) {
$count = intval($this->ldap->countEntries($cr, $res));
diff --git a/apps/user_ldap/lib/helper.php b/apps/user_ldap/lib/helper.php
index b5955cb..bac03df 100644
--- a/apps/user_ldap/lib/helper.php
+++ b/apps/user_ldap/lib/helper.php
@@ -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);
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud.git
More information about the Pkg-owncloud-commits
mailing list