Differential D12025 Diff 28956 src/applications/differential/editor/DifferentialTransactionEditor.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/differential/editor/DifferentialTransactionEditor.php
| Show First 20 Lines • Show All 528 Lines • ▼ Show 20 Lines | protected function applyCustomExternalTransaction( | ||||
| switch ($xaction->getTransactionType()) { | switch ($xaction->getTransactionType()) { | ||||
| case PhabricatorTransactions::TYPE_VIEW_POLICY: | case PhabricatorTransactions::TYPE_VIEW_POLICY: | ||||
| case PhabricatorTransactions::TYPE_EDIT_POLICY: | case PhabricatorTransactions::TYPE_EDIT_POLICY: | ||||
| return; | return; | ||||
| case PhabricatorTransactions::TYPE_SUBSCRIBERS: | case PhabricatorTransactions::TYPE_SUBSCRIBERS: | ||||
| case PhabricatorTransactions::TYPE_EDGE: | case PhabricatorTransactions::TYPE_EDGE: | ||||
| case PhabricatorTransactions::TYPE_COMMENT: | case PhabricatorTransactions::TYPE_COMMENT: | ||||
| case DifferentialTransaction::TYPE_ACTION: | case DifferentialTransaction::TYPE_ACTION: | ||||
| return; | |||||
| case DifferentialTransaction::TYPE_INLINE: | case DifferentialTransaction::TYPE_INLINE: | ||||
| $reply = $xaction->getComment()->getReplyToComment(); | |||||
| if ($reply && !$reply->getHasReplies()) { | |||||
| $reply->setHasReplies(1)->save(); | |||||
| } | |||||
| return; | return; | ||||
| case DifferentialTransaction::TYPE_UPDATE: | case DifferentialTransaction::TYPE_UPDATE: | ||||
| // Now that we're inside the transaction, do a final check. | // Now that we're inside the transaction, do a final check. | ||||
| $diff = $this->requireDiff($xaction->getNewValue()); | $diff = $this->requireDiff($xaction->getNewValue()); | ||||
| // TODO: It would be slightly cleaner to just revalidate this | // TODO: It would be slightly cleaner to just revalidate this | ||||
| // transaction somehow using the same validation code, but that's | // transaction somehow using the same validation code, but that's | ||||
| // not easy to do at the moment. | // not easy to do at the moment. | ||||
| ▲ Show 20 Lines • Show All 1,322 Lines • Show Last 20 Lines | |||||