diff --git a/src/applications/base/controller/PhabricatorController.php b/src/applications/base/controller/PhabricatorController.php --- a/src/applications/base/controller/PhabricatorController.php +++ b/src/applications/base/controller/PhabricatorController.php @@ -566,7 +566,9 @@ ->setObjectPHID($object->getPHID()) ->setTransactions($xactions) ->setPager($pager) - ->setRenderData($render_data); + ->setRenderData($render_data) + ->setQuoteTargetID($this->getRequest()->getStr('quoteTargetID')) + ->setQuoteRef($this->getRequest()->getStr('quoteRef')); $object->willRenderTimeline($timeline, $this->getRequest()); return $timeline; diff --git a/src/applications/transactions/view/PhabricatorApplicationTransactionView.php b/src/applications/transactions/view/PhabricatorApplicationTransactionView.php --- a/src/applications/transactions/view/PhabricatorApplicationTransactionView.php +++ b/src/applications/transactions/view/PhabricatorApplicationTransactionView.php @@ -198,6 +198,8 @@ $view = new PHUITimelineView(); $view->setShouldTerminate($this->shouldTerminate); + $view->setQuoteTargetID($this->getQuoteTargetID()); + $view->setQuoteRef($this->getQuoteRef()); $events = $this->buildEvents($with_hiding); foreach ($events as $event) { $view->addEvent($event); diff --git a/src/view/phui/PHUITimelineView.php b/src/view/phui/PHUITimelineView.php --- a/src/view/phui/PHUITimelineView.php +++ b/src/view/phui/PHUITimelineView.php @@ -8,6 +8,8 @@ private $shouldAddSpacers = true; private $pager; private $renderData = array(); + private $quoteTargetID; + private $quoteRef; public function setID($id) { $this->id = $id; @@ -43,6 +45,24 @@ return $this; } + public function setQuoteTargetID($quote_target_id) { + $this->quoteTargetID = $quote_target_id; + return $this; + } + + public function getQuoteTargetID() { + return $this->quoteTargetID; + } + + public function setQuoteRef($quote_ref) { + $this->quoteRef = $quote_ref; + return $this; + } + + public function getQuoteRef() { + return $this->quoteRef; + } + public function render() { if ($this->getPager()) { if ($this->id === null) { @@ -84,6 +104,9 @@ $events = array(); if ($hide && $this->getPager()) { + $uri = $this->getPager()->getNextPageURI(); + $uri->setQueryParam('quoteTargetID', $this->getQuoteTargetID()); + $uri->setQueryParam('quoteRef', $this->getQuoteRef()); $events[] = javelin_tag( 'div', array( @@ -96,7 +119,7 @@ javelin_tag( 'a', array( - 'href' => (string) $this->getPager()->getNextPageURI(), + 'href' => (string) $uri, 'mustcapture' => true, 'sigil' => 'show-older-link', ),