From 5b411228c27e36ae41456578b9badb135f32dcd7 Mon Sep 17 00:00:00 2001 From: Loic d'Anterroches Date: Wed, 13 Aug 2008 21:28:58 +0200 Subject: [PATCH] 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. --- src/IDF/Form/IssueUpdate.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/IDF/Form/IssueUpdate.php b/src/IDF/Form/IssueUpdate.php index 1fb186f..69380bf 100644 --- a/src/IDF/Form/IssueUpdate.php +++ b/src/IDF/Form/IssueUpdate.php @@ -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.'));