Differential D18984 Diff 45535 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 65 Lines • ▼ Show 20 Lines | abstract class PhabricatorApplicationTransactionEditor | ||||
private $mailToPHIDs = array(); | private $mailToPHIDs = array(); | ||||
private $mailCCPHIDs = array(); | private $mailCCPHIDs = array(); | ||||
private $feedNotifyPHIDs = array(); | private $feedNotifyPHIDs = array(); | ||||
private $feedRelatedPHIDs = array(); | private $feedRelatedPHIDs = array(); | ||||
private $feedShouldPublish = false; | private $feedShouldPublish = false; | ||||
private $mailShouldSend = false; | private $mailShouldSend = false; | ||||
private $modularTypes; | private $modularTypes; | ||||
private $silent; | private $silent; | ||||
private $mustEncrypt; | |||||
private $transactionQueue = array(); | private $transactionQueue = array(); | ||||
const STORAGE_ENCODING_BINARY = 'binary'; | const STORAGE_ENCODING_BINARY = 'binary'; | ||||
/** | /** | ||||
* Get the class name for the application this editor is a part of. | * Get the class name for the application this editor is a part of. | ||||
* | * | ||||
▲ Show 20 Lines • Show All 2,462 Lines • ▼ Show 20 Lines | foreach ($targets as $target) { | ||||
$caught = null; | $caught = null; | ||||
$mail = null; | $mail = null; | ||||
try { | try { | ||||
// Reload handles for the new viewer. | // Reload handles for the new viewer. | ||||
$this->loadHandles($xactions); | $this->loadHandles($xactions); | ||||
$mail = $this->buildMailForTarget($object, $xactions, $target); | $mail = $this->buildMailForTarget($object, $xactions, $target); | ||||
if ($this->mustEncrypt) { | |||||
->setMustEncrypt(true) | |||||
->setMustEncryptReasons($this->mustEncrypt); | |||||
} | |||||
} catch (Exception $ex) { | } catch (Exception $ex) { | ||||
$caught = $ex; | $caught = $ex; | ||||
} | } | ||||
$this->setActor($original_actor); | $this->setActor($original_actor); | ||||
unset($locale); | unset($locale); | ||||
if ($caught) { | if ($caught) { | ||||
▲ Show 20 Lines • Show All 649 Lines • ▼ Show 20 Lines | private function applyHeraldRules( | ||||
if ($adapter instanceof HarbormasterBuildableAdapterInterface) { | if ($adapter instanceof HarbormasterBuildableAdapterInterface) { | ||||
HarbormasterBuildable::applyBuildPlans( | HarbormasterBuildable::applyBuildPlans( | ||||
$adapter->getHarbormasterBuildablePHID(), | $adapter->getHarbormasterBuildablePHID(), | ||||
$adapter->getHarbormasterContainerPHID(), | $adapter->getHarbormasterContainerPHID(), | ||||
$adapter->getQueuedHarbormasterBuildRequests()); | $adapter->getQueuedHarbormasterBuildRequests()); | ||||
} | } | ||||
$this->mustEncrypt = $adapter->getMustEncryptReasons(); | |||||
return array_merge( | return array_merge( | ||||
$this->didApplyHeraldRules($object, $adapter, $xscript), | $this->didApplyHeraldRules($object, $adapter, $xscript), | ||||
$adapter->getQueuedTransactions()); | $adapter->getQueuedTransactions()); | ||||
} | } | ||||
protected function didApplyHeraldRules( | protected function didApplyHeraldRules( | ||||
PhabricatorLiskDAO $object, | PhabricatorLiskDAO $object, | ||||
HeraldAdapter $adapter, | HeraldAdapter $adapter, | ||||
▲ Show 20 Lines • Show All 328 Lines • ▼ Show 20 Lines | return array( | ||||
'heraldForcedEmailPHIDs', | 'heraldForcedEmailPHIDs', | ||||
'heraldHeader', | 'heraldHeader', | ||||
'mailToPHIDs', | 'mailToPHIDs', | ||||
'mailCCPHIDs', | 'mailCCPHIDs', | ||||
'feedNotifyPHIDs', | 'feedNotifyPHIDs', | ||||
'feedRelatedPHIDs', | 'feedRelatedPHIDs', | ||||
'feedShouldPublish', | 'feedShouldPublish', | ||||
'mailShouldSend', | 'mailShouldSend', | ||||
'mustEncrypt', | |||||
); | ); | ||||
} | } | ||||
/** | /** | ||||
* Apply encodings prior to storage. | * Apply encodings prior to storage. | ||||
* | * | ||||
* See @{method:getCustomWorkerStateEncoding}. | * See @{method:getCustomWorkerStateEncoding}. | ||||
* | * | ||||
▲ Show 20 Lines • Show All 385 Lines • Show Last 20 Lines |