1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-22 23:02:42 +01:00

Fix an issue where excluded recipients are not respected

Summary: I broke this in D3778. We modify `$parameters` and then ignore it in favor of `$params` for the rest of the method. Unit tests work great since they're one level below this.

Test Plan: Verified "Send email about my own actions" behaved correctly.

Reviewers: vrana, btrahan

Reviewed By: vrana

CC: aran

Differential Revision: https://secure.phabricator.com/D3796
This commit is contained in:
epriestley 2012-10-23 10:48:03 -07:00
parent 3ffc764141
commit 1a8232f4c9

View file

@ -342,21 +342,21 @@ final class PhabricatorMetaMTAMail extends PhabricatorMetaMTADAO {
} }
try { try {
$parameters = $this->parameters; $params = $this->parameters;
$phids = array(); $phids = array();
foreach ($parameters as $key => $value) { foreach ($params as $key => $value) {
switch ($key) { switch ($key) {
case 'to': case 'to':
$parameters[$key] = $this->buildToList(); $params[$key] = $this->buildToList();
break; break;
case 'cc': case 'cc':
$parameters[$key] = $this->buildCCList(); $params[$key] = $this->buildCCList();
break; break;
} }
} }
foreach ($parameters as $key => $value) { foreach ($params as $key => $value) {
switch ($key) { switch ($key) {
case 'from': case 'from':
$value = array($value); $value = array($value);
@ -373,7 +373,6 @@ final class PhabricatorMetaMTAMail extends PhabricatorMetaMTADAO {
$this->loadEmailAndNameDataFromPHIDs($phids); $this->loadEmailAndNameDataFromPHIDs($phids);
$params = $this->parameters;
$default = PhabricatorEnv::getEnvConfig('metamta.default-address'); $default = PhabricatorEnv::getEnvConfig('metamta.default-address');
if (empty($params['from'])) { if (empty($params['from'])) {
$mailer->setFrom($default); $mailer->setFrom($default);