From 88fc410c1936510b84497b677248cd20db9fd87f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rn=20Friedrich=20Dreyer?= Date: Thu, 20 Jun 2013 14:47:12 +0200 Subject: [PATCH] fix numRows usage in user_ldap --- apps/user_ldap/lib/access.php | 6 ++---- apps/user_ldap/lib/helper.php | 6 +++--- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/apps/user_ldap/lib/access.php b/apps/user_ldap/lib/access.php index 04f73cf01f..6f6b8d0f01 100644 --- a/apps/user_ldap/lib/access.php +++ b/apps/user_ldap/lib/access.php @@ -578,14 +578,12 @@ abstract class Access { '); //feed the DB - $res = $insert->execute(array($dn, $ocname, $this->getUUID($dn), $dn, $ocname)); + $insRows = $insert->execute(array($dn, $ocname, $this->getUUID($dn), $dn, $ocname)); - if(\OCP\DB::isError($res)) { + if(\OCP\DB::isError($insRows)) { return false; } - $insRows = $res->numRows(); - if($insRows === 0) { return false; } diff --git a/apps/user_ldap/lib/helper.php b/apps/user_ldap/lib/helper.php index 10ed40ebd6..f65f466789 100644 --- a/apps/user_ldap/lib/helper.php +++ b/apps/user_ldap/lib/helper.php @@ -90,13 +90,13 @@ class Helper { AND `appid` = \'user_ldap\' AND `configkey` NOT IN (\'enabled\', \'installed_version\', \'types\', \'bgjUpdateGroupsLastRun\') '); - $res = $query->execute(array($prefix.'%')); + $delRows = $query->execute(array($prefix.'%')); - if(\OCP\DB::isError($res)) { + if(\OCP\DB::isError($delRows)) { return false; } - if($res->numRows() === 0) { + if($delRows === 0) { return false; }