diff --git a/application/Linework/LineworkController.php b/application/Linework/LineworkController.php index ee084d460..72a3de1a5 100644 --- a/application/Linework/LineworkController.php +++ b/application/Linework/LineworkController.php @@ -295,7 +295,6 @@ class LineworkController extends mfBaseController { $t->workflowitems['kundenkabel_typ']->value->save(); } } - $value = $termination->workflowitems['customer_cable_injected']->value->value_int; foreach($termination->building->terminations as $t) { $t->workflowitems['customer_cable_injected']->value->value_int = $value; diff --git a/application/Workflowvalue/Workflowvalue.php b/application/Workflowvalue/Workflowvalue.php index f0f67580a..fbba6ead4 100644 --- a/application/Workflowvalue/Workflowvalue.php +++ b/application/Workflowvalue/Workflowvalue.php @@ -17,6 +17,14 @@ class Workflowvalue extends mfBaseModel { } } + protected function beforeSave() { + if($this->new() == "new") { + $me = new User(); + $me->loadMe(); + $this->changed = date('U'); + $this->changed_by = $me->id; + } + } public function setValue($value) { $this->item = $this->getProperty("item"); @@ -103,10 +111,10 @@ class Workflowvalue extends mfBaseModel { $this->changed_by = $me->id; } - if($this->new() == "new") { + /*if($this->new() == "new") { $this->changed = date('U'); $this->changed_by = $me->id; - } + }*/ } diff --git a/application/Workflowvalue/WorkflowvalueModel.php b/application/Workflowvalue/WorkflowvalueModel.php index 2f4ddb374..254bbb951 100644 --- a/application/Workflowvalue/WorkflowvalueModel.php +++ b/application/Workflowvalue/WorkflowvalueModel.php @@ -26,13 +26,6 @@ class WorkflowvalueModel { $me = new User(); $me->loadMe(); - - if($model->changed === null) { - $model->changed = date('U'); - } - if($model->changed_by === null) { - $model->changed_by = $me->id; - } if($model->create_by === null) { $model->create_by = $me->id;