Differential D20524 Diff 48947 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,156 Lines • ▼ Show 20 Lines | try { | ||||
} catch (AphrontDuplicateKeyQueryException $ex) { | } catch (AphrontDuplicateKeyQueryException $ex) { | ||||
// This callback has an opportunity to throw a better exception, | // This callback has an opportunity to throw a better exception, | ||||
// so execution may end here. | // so execution may end here. | ||||
$this->didCatchDuplicateKeyException($object, $xactions, $ex); | $this->didCatchDuplicateKeyException($object, $xactions, $ex); | ||||
throw $ex; | throw $ex; | ||||
} | } | ||||
$group_id = Filesystem::readRandomCharacters(32); | |||||
foreach ($xactions as $xaction) { | foreach ($xactions as $xaction) { | ||||
if ($was_locked) { | if ($was_locked) { | ||||
$is_override = $this->isLockOverrideTransaction($xaction); | $is_override = $this->isLockOverrideTransaction($xaction); | ||||
if ($is_override) { | if ($is_override) { | ||||
$xaction->setIsLockOverrideTransaction(true); | $xaction->setIsLockOverrideTransaction(true); | ||||
} | } | ||||
} | } | ||||
$xaction->setObjectPHID($object->getPHID()); | $xaction->setObjectPHID($object->getPHID()); | ||||
$xaction->setTransactionGroupID($group_id); | |||||
if ($xaction->getComment()) { | if ($xaction->getComment()) { | ||||
$xaction->setPHID($xaction->generatePHID()); | $xaction->setPHID($xaction->generatePHID()); | ||||
$comment_editor->applyEdit($xaction, $xaction->getComment()); | $comment_editor->applyEdit($xaction, $xaction->getComment()); | ||||
} else { | } else { | ||||
// TODO: This is a transitional hack to let us migrate edge | // TODO: This is a transitional hack to let us migrate edge | ||||
// transactions to a more efficient storage format. For now, we're | // transactions to a more efficient storage format. For now, we're | ||||
// going to write a new slim format to the database but keep the old | // going to write a new slim format to the database but keep the old | ||||
▲ Show 20 Lines • Show All 4,134 Lines • Show Last 20 Lines |