Differential D14822 Diff 35837 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 834 Lines • ▼ Show 20 Lines | try { | ||||
$object->endReadLocking(); | $object->endReadLocking(); | ||||
} | } | ||||
if ($transaction_open) { | if ($transaction_open) { | ||||
$object->killTransaction(); | $object->killTransaction(); | ||||
} | } | ||||
throw $ex; | throw $ex; | ||||
} | } | ||||
// TODO: Once everything is on EditEngine, just use getIsNewObject() to | |||||
// figure this out instead. | |||||
$mark_as_create = false; | |||||
$create_type = PhabricatorTransactions::TYPE_CREATE; | |||||
foreach ($xactions as $xaction) { | |||||
if ($xaction->getTransactionType() == $create_type) { | |||||
$mark_as_create = true; | |||||
} | |||||
} | |||||
if ($mark_as_create) { | |||||
foreach ($xactions as $xaction) { | foreach ($xactions as $xaction) { | ||||
if ($this->getIsNewObject()) { | |||||
$xaction->setIsCreateTransaction(true); | $xaction->setIsCreateTransaction(true); | ||||
} | } | ||||
} | } | ||||
// Now that we've merged, filtered, and combined transactions, check for | // Now that we've merged, filtered, and combined transactions, check for | ||||
// required capabilities. | // required capabilities. | ||||
foreach ($xactions as $xaction) { | foreach ($xactions as $xaction) { | ||||
$this->requireCapabilities($object, $xaction); | $this->requireCapabilities($object, $xaction); | ||||
▲ Show 20 Lines • Show All 2,495 Lines • Show Last 20 Lines |