@@ 715-726 (lines=12) @@ | ||
712 | * @param string $message Generated message |
|
713 | * @param string $comment Author comment |
|
714 | */ |
|
715 | public function addMovement($message, $comment = '', $createdOn = null) |
|
716 | { |
|
717 | require_once dirname(__FILE__).'/movement.class.php'; |
|
718 | ||
719 | $movement = new absences_Movement(); |
|
720 | $movement->message = $message; |
|
721 | $movement->comment = $comment; |
|
722 | $movement->setRequest($this); |
|
723 | $movement->setAgent($this->getAgent()); |
|
724 | $movement->createdOn = $createdOn; |
|
725 | $movement->save(); |
|
726 | } |
|
727 | ||
728 | ||
729 |
@@ 1089-1104 (lines=16) @@ | ||
1086 | * @param string $message Generated message |
|
1087 | * @param string $comment Author comment |
|
1088 | */ |
|
1089 | public function addMovement($message, $comment = '', $id_author = null) |
|
1090 | { |
|
1091 | require_once dirname(__FILE__).'/movement.class.php'; |
|
1092 | ||
1093 | $movement = new absences_Movement(); |
|
1094 | $movement->message = $message; |
|
1095 | $movement->comment = $comment; |
|
1096 | ||
1097 | if (isset($id_author)) |
|
1098 | { |
|
1099 | $movement->id_author = $id_author; |
|
1100 | } |
|
1101 | ||
1102 | $movement->setRight($this); |
|
1103 | $movement->save(); |
|
1104 | } |
|
1105 | ||
1106 | ||
1107 |