diff --git a/src/applications/phriction/editor/PhrictionTransactionEditor.php b/src/applications/phriction/editor/PhrictionTransactionEditor.php --- a/src/applications/phriction/editor/PhrictionTransactionEditor.php +++ b/src/applications/phriction/editor/PhrictionTransactionEditor.php @@ -69,6 +69,11 @@ return $this->processContentVersionError; } + public function setMoveAwayDocument(PhrictionDocument $document) { + $this->moveAwayDocument = $document; + return $this; + } + public function getEditorApplicationClass() { return 'PhabricatorPhrictionApplication'; } @@ -116,11 +121,6 @@ case PhrictionTransaction::TYPE_CONTENT: case PhrictionTransaction::TYPE_DELETE: return $xaction->getNewValue(); - case PhrictionDocumentMoveToTransaction::TRANSACTIONTYPE: - $document = $xaction->getNewValue(); - // grab the real object now for the sub-editor to come - $this->moveAwayDocument = $document; - return; case PhrictionTransaction::TYPE_MOVE_AWAY: $document = $xaction->getNewValue(); $dict = array( diff --git a/src/applications/phriction/xaction/PhrictionDocumentMoveToTransaction.php b/src/applications/phriction/xaction/PhrictionDocumentMoveToTransaction.php --- a/src/applications/phriction/xaction/PhrictionDocumentMoveToTransaction.php +++ b/src/applications/phriction/xaction/PhrictionDocumentMoveToTransaction.php @@ -17,12 +17,15 @@ 'content' => $document->getContent()->getContent(), 'title' => $document->getContent()->getTitle(), ); + + $editor = $this->getEditor(); + $editor->setMoveAwayDocument($document); + return $dict; } public function applyInternalEffects($object, $value) { $object->setStatus(PhrictionDocumentStatus::STATUS_EXISTS); - $this->getEditor()->getNewContent()->setTitle($value); } public function applyExternalEffects($object, $value) {