Added Email Logging for Emailnotification class

This commit is contained in:
Frank Schubert
2025-08-22 17:49:54 +02:00
parent 866c3b2ae1
commit 3a86160b38
26 changed files with 1636 additions and 46 deletions

View File

@@ -20,6 +20,7 @@ class mfBaseModel {
protected $edit;
private $worker;
protected $forcestr;
protected $forcebinary;
protected $mode = "new";
protected $saved = 0;
@@ -158,17 +159,28 @@ class mfBaseModel {
$fields = $this->buildFields();
$forcestr = array();
if(!$this->fieldprefix && is_array($this->forcestr) && count($this->forcestr)) {
$forcestr = $this->forcestr;
}
$forcebinary = array();
if(is_array($this->forcestr) && count($this->forcestr)) {
foreach($this->forcestr as $fstr) {
$forcestr[] = $this->fieldprefix . "_$fstr";
if ($this->fieldprefix) {
foreach ($this->forcestr as $fstr) {
$forcestr[] = $this->fieldprefix . "_$fstr";
}
} else {
$forcestr = $this->forcestr;
}
}
if(is_array($this->forcebinary) && count($this->forcebinary)) {
if ($this->fieldprefix) {
foreach ($this->forcebinary as $fstr) {
$forcebinary[] = $this->fieldprefix . "_$fstr";
}
} else {
$forcebinary = $this->forcebinary;
}
}
if(!is_array($fields) or !count($fields)) {
return false;
}
@@ -179,7 +191,7 @@ class mfBaseModel {
if($this->fieldprefix) {
$where = "`" . $this->fieldprefix . "_id`=$id";
}
if($this->db->update($this->table, $fields, $where, $forcestr)) {
if($this->db->update($this->table, $fields, $where, $forcestr, $forcebinary)) {
$this->saved++;
if(method_exists($this, "afterSave")) {
$this->afterSave($_params);
@@ -187,7 +199,7 @@ class mfBaseModel {
return $id;
}
} else {
if($this->db->insert($this->table, $fields, $forcestr)) {
if($this->db->insert($this->table, $fields, $forcestr, $forcebinary)) {
$id = $this->db->insert_id;
$this->id = $id;
$this->saved++;