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

Transactions - make quotes work for older transactions

Summary: Fixes T6731. I don't really understand the intent behind the two view classes here, but to get this to work I need to pass yet more data to the lower-level class.

Test Plan: Viewed a task with many comments. Clicked "show older". Quoted everything I could. Verified for each quote that it quoted correctly, inlcuding linking to the prior transaction.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin, epriestley

Maniphest Tasks: T6731

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

+29 -2
+3 -1
src/applications/base/controller/PhabricatorController.php
··· 566 566 ->setObjectPHID($object->getPHID()) 567 567 ->setTransactions($xactions) 568 568 ->setPager($pager) 569 - ->setRenderData($render_data); 569 + ->setRenderData($render_data) 570 + ->setQuoteTargetID($this->getRequest()->getStr('quoteTargetID')) 571 + ->setQuoteRef($this->getRequest()->getStr('quoteRef')); 570 572 $object->willRenderTimeline($timeline, $this->getRequest()); 571 573 572 574 return $timeline;
+2
src/applications/transactions/view/PhabricatorApplicationTransactionView.php
··· 198 198 199 199 $view = new PHUITimelineView(); 200 200 $view->setShouldTerminate($this->shouldTerminate); 201 + $view->setQuoteTargetID($this->getQuoteTargetID()); 202 + $view->setQuoteRef($this->getQuoteRef()); 201 203 $events = $this->buildEvents($with_hiding); 202 204 foreach ($events as $event) { 203 205 $view->addEvent($event);
+24 -1
src/view/phui/PHUITimelineView.php
··· 8 8 private $shouldAddSpacers = true; 9 9 private $pager; 10 10 private $renderData = array(); 11 + private $quoteTargetID; 12 + private $quoteRef; 11 13 12 14 public function setID($id) { 13 15 $this->id = $id; ··· 43 45 return $this; 44 46 } 45 47 48 + public function setQuoteTargetID($quote_target_id) { 49 + $this->quoteTargetID = $quote_target_id; 50 + return $this; 51 + } 52 + 53 + public function getQuoteTargetID() { 54 + return $this->quoteTargetID; 55 + } 56 + 57 + public function setQuoteRef($quote_ref) { 58 + $this->quoteRef = $quote_ref; 59 + return $this; 60 + } 61 + 62 + public function getQuoteRef() { 63 + return $this->quoteRef; 64 + } 65 + 46 66 public function render() { 47 67 if ($this->getPager()) { 48 68 if ($this->id === null) { ··· 84 104 85 105 $events = array(); 86 106 if ($hide && $this->getPager()) { 107 + $uri = $this->getPager()->getNextPageURI(); 108 + $uri->setQueryParam('quoteTargetID', $this->getQuoteTargetID()); 109 + $uri->setQueryParam('quoteRef', $this->getQuoteRef()); 87 110 $events[] = javelin_tag( 88 111 'div', 89 112 array( ··· 96 119 javelin_tag( 97 120 'a', 98 121 array( 99 - 'href' => (string) $this->getPager()->getNextPageURI(), 122 + 'href' => (string) $uri, 100 123 'mustcapture' => true, 101 124 'sigil' => 'show-older-link', 102 125 ),