Differential D13206 Diff 31926 src/applications/transactions/editor/PhabricatorApplicationTransactionEditor.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/transactions/editor/PhabricatorApplicationTransactionEditor.php
| Show First 20 Lines • Show All 1,012 Lines • ▼ Show 20 Lines | final public function applyTransactions( | ||||
| return $xactions; | return $xactions; | ||||
| } | } | ||||
| public function publishTransactions( | public function publishTransactions( | ||||
| PhabricatorLiskDAO $object, | PhabricatorLiskDAO $object, | ||||
| array $xactions) { | array $xactions) { | ||||
| // Before sending mail or publishing feed stories, reload the object | // Hook for edges or other properties that may need (re-)loading | ||||
| // subscribers to pick up changes caused by Herald (or by other side effects | |||||
| // in various transaction phases). | |||||
| $this->loadSubscribers($object); | |||||
| // Hook for other edges that may need (re-)loading | |||||
| $object = $this->willPublish($object, $xactions); | $object = $this->willPublish($object, $xactions); | ||||
| $mailed = array(); | $mailed = array(); | ||||
| if (!$this->getDisableEmail()) { | if (!$this->getDisableEmail()) { | ||||
| if ($this->shouldSendMail($object, $xactions)) { | if ($this->shouldSendMail($object, $xactions)) { | ||||
| $mailed = $this->sendMail($object, $xactions); | $mailed = $this->sendMail($object, $xactions); | ||||
| } | } | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 1,385 Lines • ▼ Show 20 Lines | /* -( Sending Mail )------------------------------------------------------- */ | ||||
| /** | /** | ||||
| * @task mail | * @task mail | ||||
| */ | */ | ||||
| protected function getMailCC(PhabricatorLiskDAO $object) { | protected function getMailCC(PhabricatorLiskDAO $object) { | ||||
| $phids = array(); | $phids = array(); | ||||
| $has_support = false; | $has_support = false; | ||||
| if ($object instanceof PhabricatorSubscribableInterface) { | if ($object instanceof PhabricatorSubscribableInterface) { | ||||
| $phids[] = $this->subscribers; | $phid = $object->getPHID(); | ||||
| $phids[] = PhabricatorSubscribersQuery::loadSubscribersForPHID($phid); | |||||
| $has_support = true; | $has_support = true; | ||||
| } | } | ||||
| if ($object instanceof PhabricatorProjectInterface) { | if ($object instanceof PhabricatorProjectInterface) { | ||||
| $project_phids = PhabricatorEdgeQuery::loadDestinationPHIDs( | $project_phids = PhabricatorEdgeQuery::loadDestinationPHIDs( | ||||
| $object->getPHID(), | $object->getPHID(), | ||||
| PhabricatorProjectObjectHasProjectEdgeType::EDGECONST); | PhabricatorProjectObjectHasProjectEdgeType::EDGECONST); | ||||
| ▲ Show 20 Lines • Show All 623 Lines • Show Last 20 Lines | |||||