fix numRows usage in user_ldap
This commit is contained in:
parent
643c8d3088
commit
88fc410c19
|
@ -578,14 +578,12 @@ abstract class Access {
|
||||||
');
|
');
|
||||||
|
|
||||||
//feed the DB
|
//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;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
$insRows = $res->numRows();
|
|
||||||
|
|
||||||
if($insRows === 0) {
|
if($insRows === 0) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -90,13 +90,13 @@ class Helper {
|
||||||
AND `appid` = \'user_ldap\'
|
AND `appid` = \'user_ldap\'
|
||||||
AND `configkey` NOT IN (\'enabled\', \'installed_version\', \'types\', \'bgjUpdateGroupsLastRun\')
|
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;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if($res->numRows() === 0) {
|
if($delRows === 0) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue