]> source.dussan.org Git - nextcloud-server.git/commitdiff
fix numRows usage in user_ldap
authorJörn Friedrich Dreyer <jfd@butonic.de>
Thu, 20 Jun 2013 12:47:12 +0000 (14:47 +0200)
committerJörn Friedrich Dreyer <jfd@butonic.de>
Mon, 24 Jun 2013 14:29:58 +0000 (16:29 +0200)
apps/user_ldap/lib/access.php
apps/user_ldap/lib/helper.php

index 04f73cf01fe96b25895e12bb74b7287e15362c17..6f6b8d0f016f03c7559b21179827f229db27bff4 100644 (file)
@@ -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;
                }
index 10ed40ebd6a0ae9b618a7b17636c2b86b3d46c67..f65f466789f880099e0755875f38939c16e75ecf 100644 (file)
@@ -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;
                }