Fixed saving edit_by in some Controllers

This commit is contained in:
Frank Schubert
2025-01-24 15:04:24 +01:00
parent 22bd84663a
commit 39cf386638
53 changed files with 556 additions and 61 deletions

View File

@@ -129,6 +129,10 @@ class mfBaseModel {
}
public function update(array $data) {
if(method_exists($this, "beforeUpdate")) {
$data = $this->beforeUpdate($data);
}
foreach($data as $key => $value) {
if($value === null) {
$this->$key = null;
@@ -136,6 +140,12 @@ class mfBaseModel {
$this->$key = $value;
}
}
if(method_exists($this, "afterUpdate")) {
$this->afterUpdate($data);
}
return true;
}
public function save() {