Fixed saving edit_by in some Controllers
This commit is contained in:
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user