@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Fix an issue in Phriction where moving a document just copied it instead

Summary: Ref T12732. See D17918. With modular transactions, `getCustomTransactionNewValue()` isn't actually called.

Test Plan: Moved document `/x/` to `/y/`, saw document gone at `/x/` instead of copied.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T12732

Differential Revision: https://secure.phabricator.com/D17963

+9 -6
+5 -5
src/applications/phriction/editor/PhrictionTransactionEditor.php
··· 69 69 return $this->processContentVersionError; 70 70 } 71 71 72 + public function setMoveAwayDocument(PhrictionDocument $document) { 73 + $this->moveAwayDocument = $document; 74 + return $this; 75 + } 76 + 72 77 public function getEditorApplicationClass() { 73 78 return 'PhabricatorPhrictionApplication'; 74 79 } ··· 116 121 case PhrictionTransaction::TYPE_CONTENT: 117 122 case PhrictionTransaction::TYPE_DELETE: 118 123 return $xaction->getNewValue(); 119 - case PhrictionDocumentMoveToTransaction::TRANSACTIONTYPE: 120 - $document = $xaction->getNewValue(); 121 - // grab the real object now for the sub-editor to come 122 - $this->moveAwayDocument = $document; 123 - return; 124 124 case PhrictionTransaction::TYPE_MOVE_AWAY: 125 125 $document = $xaction->getNewValue(); 126 126 $dict = array(
+4 -1
src/applications/phriction/xaction/PhrictionDocumentMoveToTransaction.php
··· 17 17 'content' => $document->getContent()->getContent(), 18 18 'title' => $document->getContent()->getTitle(), 19 19 ); 20 + 21 + $editor = $this->getEditor(); 22 + $editor->setMoveAwayDocument($document); 23 + 20 24 return $dict; 21 25 } 22 26 23 27 public function applyInternalEffects($object, $value) { 24 28 $object->setStatus(PhrictionDocumentStatus::STATUS_EXISTS); 25 - $this->getEditor()->getNewContent()->setTitle($value); 26 29 } 27 30 28 31 public function applyExternalEffects($object, $value) {