mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-22 14:52:41 +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:
parent
3ffc764141
commit
1a8232f4c9
1 changed files with 5 additions and 6 deletions
|
@ -342,21 +342,21 @@ final class PhabricatorMetaMTAMail extends PhabricatorMetaMTADAO {
|
|||
}
|
||||
|
||||
try {
|
||||
$parameters = $this->parameters;
|
||||
$params = $this->parameters;
|
||||
$phids = array();
|
||||
|
||||
foreach ($parameters as $key => $value) {
|
||||
foreach ($params as $key => $value) {
|
||||
switch ($key) {
|
||||
case 'to':
|
||||
$parameters[$key] = $this->buildToList();
|
||||
$params[$key] = $this->buildToList();
|
||||
break;
|
||||
case 'cc':
|
||||
$parameters[$key] = $this->buildCCList();
|
||||
$params[$key] = $this->buildCCList();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
foreach ($parameters as $key => $value) {
|
||||
foreach ($params as $key => $value) {
|
||||
switch ($key) {
|
||||
case 'from':
|
||||
$value = array($value);
|
||||
|
@ -373,7 +373,6 @@ final class PhabricatorMetaMTAMail extends PhabricatorMetaMTADAO {
|
|||
|
||||
$this->loadEmailAndNameDataFromPHIDs($phids);
|
||||
|
||||
$params = $this->parameters;
|
||||
$default = PhabricatorEnv::getEnvConfig('metamta.default-address');
|
||||
if (empty($params['from'])) {
|
||||
$mailer->setFrom($default);
|
||||
|
|
Loading…
Reference in a new issue