Added a smarter way to mark a user as interested by an issue.

A user posting a comment is marked as interested only if not the owner
and not the submitter. If in that case, the user will be anyway notified
of the changes to those issues.
This commit is contained in:
Loic d'Anterroches 2008-08-13 21:28:58 +02:00
parent 0e3a74558c
commit 5b411228c2

View File

@ -253,7 +253,10 @@ class IDF_Form_IssueUpdate extends IDF_Form_IssueCreate
$comment->changes = $changes;
$comment->create();
$this->issue->update();
if ($this->issue->owner != $this->user->id and
$this->issue->submitter != $this->user->id) {
$this->issue->setAssoc($this->user); // interested user.
}
return $this->issue;
}
throw new Exception(__('Cannot save the model from an invalid form.'));