diff options
author | Aleksey Lim <alsroot@member.fsf.org> | 2009-11-23 15:16:52 (GMT) |
---|---|---|
committer | Aleksey Lim <alsroot@member.fsf.org> | 2009-11-23 15:16:52 (GMT) |
commit | ba730137b3bb68dde8fbe44967b4de0214703bda (patch) | |
tree | 51e25a72192251fa1e6169e397aa6215fe13dfc8 | |
parent | b0be6ba1f0911cea8e91d4ce0ae5c17777f467cc (diff) |
Do not rewrite 'to' while aslo emailing
-rw-r--r-- | site/app/controllers/components/editors.php | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/site/app/controllers/components/editors.php b/site/app/controllers/components/editors.php index cd7f3a3..a6ba460 100644 --- a/site/app/controllers/components/editors.php +++ b/site/app/controllers/components/editors.php @@ -142,10 +142,9 @@ class EditorsComponent extends Object { if (empty($authors)) { $emailInfo['email'] = EDITOR_EMAIL; - $this->controller->Email->to = EDITOR_EMAIL; + $emailInfo['cc'] = null; } else { - $this->controller->Email->to = $emailInfo['email']; - $this->controller->Email->cc = array(EDITOR_EMAIL); + $emailInfo['cc'] = array(EDITOR_EMAIL); } $this->controller->set('info', $emailInfo); @@ -160,6 +159,8 @@ class EditorsComponent extends Object { if ($data['Approval']['ActionField'] != 'superreview') { $this->controller->Email->template = 'email/nominated/'.$data['Approval']['ActionField']; $this->controller->Email->subject = sprintf('[%s] %s-%s', strtoupper($data['Approval']['ActionField']), $emailInfo['name'], $emailInfo['version']); + $this->controller->Email->to = $emailInfo['email']; + $this->controller->Email->cc = $emailInfo['cc']; $this->controller->Email->reply_to = array_merge(array(EDITOR_EMAIL), $authors); $this->controller->Email->in_reply_to = $version['Version']['in_reply_to']; } @@ -314,10 +315,9 @@ class EditorsComponent extends Object { ); if (empty($authors)) { $emailInfo['email'] = EDITOR_EMAIL; - $this->controller->Email->to = EDITOR_EMAIL; + $emailInfo['cc'] = null; } else { - $this->controller->Email->to = $emailInfo['email']; - $this->controller->Email->cc = array(EDITOR_EMAIL); + $emailInfo['cc'] = array(EDITOR_EMAIL); } $this->controller->set('info', $emailInfo); @@ -331,6 +331,8 @@ class EditorsComponent extends Object { if ($data['Approval']['ActionField'] != 'superreview') { $this->controller->Email->template = 'email/pending/'.$data['Approval']['ActionField']; $this->controller->Email->subject = sprintf('[%s] %s-%s', strtoupper($data['Approval']['ActionField']), $emailInfo['name'], $emailInfo['version']); + $this->controller->Email->to = $emailInfo['email']; + $this->controller->Email->cc = $emailInfo['cc']; $this->controller->Email->reply_to = array_merge(array(EDITOR_EMAIL), $authors); $this->controller->Email->in_reply_to = $version['Version']['in_reply_to']; } |