Fixed saving edit_by in some Controllers
This commit is contained in:
@@ -4,6 +4,16 @@ class RimoWorkorder extends mfBaseModel {
|
||||
private $adb_wohneinheit;
|
||||
private $termination;
|
||||
|
||||
protected function beforeUpdate($data) {
|
||||
if(!array_key_exists("edit_by", $data)) {
|
||||
$me = new User();
|
||||
$me->loadMe();
|
||||
$data["edit_by"] = $me->id;
|
||||
}
|
||||
|
||||
return $data;
|
||||
}
|
||||
|
||||
public function afterSave() {
|
||||
// prevent potential infinite loop
|
||||
$nesting_level = mfValuecache::singleton()->get("rimoworkorder-save-nesting-level-".$this->id);
|
||||
|
||||
Reference in New Issue
Block a user