fix numRows usage in user_ldap

This commit is contained in:
Jörn Friedrich Dreyer 2013-06-20 14:47:12 +02:00
parent 643c8d3088
commit 88fc410c19
2 changed files with 5 additions and 7 deletions

View 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;
}

View 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;
}