@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.

Slightly simplify logic for determining if an inline comment has an effect

Summary: Minor cleanup, this logic can be simpler. Instead of special-casing inlines as having an effect if the have a comment, just consider any transaction with a comment to have an effect. I'm fairly certain this is always true.

Test Plan: Made inlines, tried to submit empty comments. Behavior unchanged.

Reviewers: chad

Reviewed By: chad

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

+4 -16
-14
src/applications/differential/editor/DifferentialTransactionEditor.php
··· 107 107 return parent::getCustomTransactionNewValue($object, $xaction); 108 108 } 109 109 110 - protected function transactionHasEffect( 111 - PhabricatorLiskDAO $object, 112 - PhabricatorApplicationTransaction $xaction) { 113 - 114 - $actor_phid = $this->getActingAsPHID(); 115 - 116 - switch ($xaction->getTransactionType()) { 117 - case DifferentialTransaction::TYPE_INLINE: 118 - return $xaction->hasComment(); 119 - } 120 - 121 - return parent::transactionHasEffect($object, $xaction); 122 - } 123 - 124 110 protected function applyCustomInternalTransaction( 125 111 PhabricatorLiskDAO $object, 126 112 PhabricatorApplicationTransaction $xaction) {
+4 -2
src/applications/transactions/editor/PhabricatorApplicationTransactionEditor.php
··· 486 486 switch ($xaction->getTransactionType()) { 487 487 case PhabricatorTransactions::TYPE_CREATE: 488 488 return true; 489 - case PhabricatorTransactions::TYPE_COMMENT: 490 - return $xaction->hasComment(); 491 489 case PhabricatorTransactions::TYPE_CUSTOMFIELD: 492 490 $field = $this->getCustomFieldForTransaction($object, $xaction); 493 491 return $field->getApplicationTransactionHasEffect($xaction); ··· 532 530 $object, 533 531 $xaction->getOldValue(), 534 532 $xaction->getNewValue()); 533 + } 534 + 535 + if ($xaction->hasComment()) { 536 + return true; 535 537 } 536 538 537 539 return ($xaction->getOldValue() !== $xaction->getNewValue());