Changeset View
Changeset View
Standalone View
Standalone View
src/applications/phriction/editor/PhrictionTransactionEditor.php
Show First 20 Lines • Show All 158 Lines • ▼ Show 20 Lines | final class PhrictionTransactionEditor | ||||
} | } | ||||
protected function applyCustomInternalTransaction( | protected function applyCustomInternalTransaction( | ||||
PhabricatorLiskDAO $object, | PhabricatorLiskDAO $object, | ||||
PhabricatorApplicationTransaction $xaction) { | PhabricatorApplicationTransaction $xaction) { | ||||
switch ($xaction->getTransactionType()) { | switch ($xaction->getTransactionType()) { | ||||
case PhrictionTransaction::TYPE_CONTENT: | case PhrictionTransaction::TYPE_CONTENT: | ||||
$object->setStatus(PhrictionDocumentStatus::STATUS_EXISTS); | |||||
return; | |||||
case PhrictionTransaction::TYPE_MOVE_AWAY: | case PhrictionTransaction::TYPE_MOVE_AWAY: | ||||
$object->setStatus(PhrictionDocumentStatus::STATUS_MOVED); | $object->setStatus(PhrictionDocumentStatus::STATUS_MOVED); | ||||
return; | return; | ||||
case PhrictionTransaction::TYPE_DELETE: | case PhrictionTransaction::TYPE_DELETE: | ||||
$object->setStatus(PhrictionDocumentStatus::STATUS_DELETED); | $object->setStatus(PhrictionDocumentStatus::STATUS_DELETED); | ||||
return; | return; | ||||
} | } | ||||
} | } | ||||
▲ Show 20 Lines • Show All 61 Lines • ▼ Show 20 Lines | final class PhrictionTransactionEditor | ||||
protected function applyFinalEffects( | protected function applyFinalEffects( | ||||
PhabricatorLiskDAO $object, | PhabricatorLiskDAO $object, | ||||
array $xactions) { | array $xactions) { | ||||
$save_content = false; | $save_content = false; | ||||
foreach ($xactions as $xaction) { | foreach ($xactions as $xaction) { | ||||
switch ($xaction->getTransactionType()) { | switch ($xaction->getTransactionType()) { | ||||
case PhrictionDocumentTitleTransaction::TRANSACTIONTYPE: | case PhrictionDocumentTitleTransaction::TRANSACTIONTYPE: | ||||
case PhrictionDocumentMoveToTransaction::TRANSACTIONTYPE: | |||||
case PhrictionTransaction::TYPE_CONTENT: | case PhrictionTransaction::TYPE_CONTENT: | ||||
case PhrictionTransaction::TYPE_DELETE: | case PhrictionTransaction::TYPE_DELETE: | ||||
case PhrictionTransaction::TYPE_MOVE_AWAY: | case PhrictionTransaction::TYPE_MOVE_AWAY: | ||||
case PhrictionDocumentMoveToTransaction::TRANSACTIONTYPE: | |||||
$save_content = true; | $save_content = true; | ||||
break; | break; | ||||
default: | default: | ||||
break; | break; | ||||
} | } | ||||
} | } | ||||
if ($save_content) { | if ($save_content) { | ||||
▲ Show 20 Lines • Show All 490 Lines • Show Last 20 Lines |