@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 Phriction status not set property on new document

Summary: I deleted too many lines of code here and TYPE_MOVE was always being applied when CONTENT was set. This should fix on next document save, but should I write some migration tool anyways?

Test Plan: Create a new document, see document with correct status.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

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

authored by

Chad Little and committed by
chad
d783299a 93e28da7

+6 -1
+3 -1
src/applications/phriction/editor/PhrictionTransactionEditor.php
··· 164 164 165 165 switch ($xaction->getTransactionType()) { 166 166 case PhrictionTransaction::TYPE_CONTENT: 167 + $object->setStatus(PhrictionDocumentStatus::STATUS_EXISTS); 168 + return; 167 169 case PhrictionTransaction::TYPE_MOVE_AWAY: 168 170 $object->setStatus(PhrictionDocumentStatus::STATUS_MOVED); 169 171 return; ··· 241 243 foreach ($xactions as $xaction) { 242 244 switch ($xaction->getTransactionType()) { 243 245 case PhrictionDocumentTitleTransaction::TRANSACTIONTYPE: 246 + case PhrictionDocumentMoveToTransaction::TRANSACTIONTYPE: 244 247 case PhrictionTransaction::TYPE_CONTENT: 245 248 case PhrictionTransaction::TYPE_DELETE: 246 249 case PhrictionTransaction::TYPE_MOVE_AWAY: 247 - case PhrictionDocumentMoveToTransaction::TRANSACTIONTYPE: 248 250 $save_content = true; 249 251 break; 250 252 default:
+3
src/applications/phriction/xaction/PhrictionDocumentTitleTransaction.php
··· 14 14 15 15 public function applyInternalEffects($object, $value) { 16 16 $object->setStatus(PhrictionDocumentStatus::STATUS_EXISTS); 17 + } 18 + 19 + public function applyExternalEffects($object, $value) { 17 20 $this->getEditor()->getNewContent()->setTitle($value); 18 21 } 19 22