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

Pholio inline comments appear after comment

Summary: Pholio inline comments now appear after comments. Adding inline comment shows up properly on comments.

Test Plan: {F33723}

Reviewers: epriestley, johann.fridriksson

Reviewed By: johann.fridriksson

CC: aran, Korvin

Maniphest Tasks: T2446

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

authored by

Lauri-Henrik Jalonen and committed by
epriestley
1f00f272 04aa59ab

+26 -3
+3 -3
src/applications/pholio/controller/PholioMockCommentController.php
··· 56 56 mpull($mock->getImages(), 'getID')); 57 57 58 58 foreach ($inlineComments as $inlineComment) { 59 - $xactions[] = id(new PholioTransaction()) 60 - ->setTransactionType(PholioTransactionType::TYPE_INLINE) 61 - ->attachComment($inlineComment); 59 + $xactions[] = id(new PholioTransaction()) 60 + ->setTransactionType(PholioTransactionType::TYPE_INLINE) 61 + ->attachComment($inlineComment); 62 62 } 63 63 64 64 $editor = id(new PholioMockEditor())
+18
src/applications/pholio/editor/PholioMockEditor.php
··· 140 140 return true; 141 141 } 142 142 143 + protected function sortTransactions(array $xactions) { 144 + $head = array(); 145 + $tail = array(); 146 + 147 + // Move inline comments to the end, so the comments preceed them. 148 + foreach ($xactions as $xaction) { 149 + $type = $xaction->getTransactionType(); 150 + if ($type == PholioTransactionType::TYPE_INLINE) { 151 + $tail[] = $xaction; 152 + } else { 153 + $head[] = $xaction; 154 + } 155 + } 156 + 157 + return array_values(array_merge($head, $tail)); 158 + } 159 + 160 + 143 161 }
+5
src/applications/pholio/storage/PholioTransaction.php
··· 53 53 'The old description was: %s', 54 54 $this->renderHandleLink($author_phid), 55 55 $old); 56 + break; 57 + case PholioTransactionType::TYPE_INLINE: 58 + return pht( 59 + '%s added an inline comment.', 60 + $this->renderHandleLink($author_phid)); 56 61 } 57 62 58 63 return parent::getTitle();