Changeset View
Changeset View
Standalone View
Standalone View
src/applications/metamta/storage/PhabricatorMetaMTAMail.php
| Show First 20 Lines • Show All 158 Lines • ▼ Show 20 Lines | public function setForceHeraldMailRecipientPHIDs(array $force) { | ||||
| $this->setParam('herald-force-recipients', $force); | $this->setParam('herald-force-recipients', $force); | ||||
| return $this; | return $this; | ||||
| } | } | ||||
| private function getForceHeraldMailRecipientPHIDs() { | private function getForceHeraldMailRecipientPHIDs() { | ||||
| return $this->getParam('herald-force-recipients', array()); | return $this->getParam('herald-force-recipients', array()); | ||||
| } | } | ||||
| public function getTranslation(array $objects) { | |||||
epriestley: This has been unused for a long time, it just never got cleaned up. | |||||
| $default_translation = PhabricatorEnv::getEnvConfig('translation.provider'); | |||||
| $return = null; | |||||
| $recipients = array_merge( | |||||
| idx($this->parameters, 'to', array()), | |||||
| idx($this->parameters, 'cc', array())); | |||||
| foreach (array_select_keys($objects, $recipients) as $object) { | |||||
| $translation = null; | |||||
| if ($object instanceof PhabricatorUser) { | |||||
| $translation = $object->getTranslation(); | |||||
| } | |||||
| if (!$translation) { | |||||
| $translation = $default_translation; | |||||
| } | |||||
| if ($return && $translation != $return) { | |||||
| return $default_translation; | |||||
| } | |||||
| $return = $translation; | |||||
| } | |||||
| if (!$return) { | |||||
| $return = $default_translation; | |||||
| } | |||||
| return $return; | |||||
| } | |||||
| public function addPHIDHeaders($name, array $phids) { | public function addPHIDHeaders($name, array $phids) { | ||||
| $phids = array_unique($phids); | $phids = array_unique($phids); | ||||
| foreach ($phids as $phid) { | foreach ($phids as $phid) { | ||||
| $this->addHeader($name, '<'.$phid.'>'); | $this->addHeader($name, '<'.$phid.'>'); | ||||
| } | } | ||||
| return $this; | return $this; | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 996 Lines • Show Last 20 Lines | |||||
This has been unused for a long time, it just never got cleaned up.