Fix var not defined
This commit is contained in:
parent
4b3cd947f2
commit
7c3688c66f
@ -499,7 +499,7 @@ if ($object->fetch($id) >= 0)
|
||||
|
||||
// Fix/update nbemail on emailing record if it differs (may happen if user edit lines from database directly)
|
||||
if (empty($asearchcriteriahasbeenset)) {
|
||||
if ($nbtotalofrecords != $object->email) {
|
||||
if ($nbtotalofrecords != $object->nbemail) {
|
||||
dol_syslog("We found a difference in nb of record in target table and the property ->nbemail, we fix ->nbemail");
|
||||
//print "nbemail=".$object->nbemail." nbtotalofrecords=".$nbtotalofrecords;
|
||||
$resultrefresh = $object->refreshNbOfTargets();
|
||||
|
||||
@ -603,12 +603,15 @@ class Mailing extends CommonObject
|
||||
if (! $resqlupdate) {
|
||||
$this->error = $this->db->lasterror();
|
||||
return -1;
|
||||
} else {
|
||||
$this->nbemail = (int) $nbforupdate;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
$this->error = $this->db->lasterror();
|
||||
return -1;
|
||||
}
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user