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.
svn
Loic d'Anterroches 2008-08-13 21:28:58 +02:00
parent 0e3a74558c
commit 5b411228c2
1 changed files with 4 additions and 1 deletions

View File

@ -253,7 +253,10 @@ class IDF_Form_IssueUpdate extends IDF_Form_IssueCreate
$comment->changes = $changes;
$comment->create();
$this->issue->update();
$this->issue->setAssoc($this->user); // interested user.
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.'));