diff --git a/module/action/model.php b/module/action/model.php index 6c6b98ce05..e3d7b65782 100755 --- a/module/action/model.php +++ b/module/action/model.php @@ -90,6 +90,9 @@ class actionModel extends model /* Add index for global search. */ $this->saveIndex($objectType, $objectID, $actionType); + $changeFunc = 'after' . ucfirst($objectType); + if(method_exists($this, $changeFunc)) call_user_func_array(array($this, $changeFunc), array($action, $actionID)); + return $actionID; } @@ -907,6 +910,13 @@ class actionModel extends model } $this->dao->insert(TABLE_HISTORY)->data($change)->exec(); } + + if(isset($this->session->calllbackActionList[$actionID])) + { + $callbackMethod = $this->session->calllbackActionList[$actionID]; + unset($this->session->calllbackActionList[$actionID]); + if(method_exists($this, $callbackMethod)) call_user_func_array(array($this, $callbackMethod), array($actionID)); + } } /**