diff --git a/src/applications/differential/controller/DifferentialRevisionViewController.php b/src/applications/differential/controller/DifferentialRevisionViewController.php index 50766eaac3..16441a2ff9 100644 --- a/src/applications/differential/controller/DifferentialRevisionViewController.php +++ b/src/applications/differential/controller/DifferentialRevisionViewController.php @@ -223,10 +223,11 @@ final class DifferentialRevisionViewController extends DifferentialController { $visible_changesets = $changesets; } - $revision_detail = new DifferentialRevisionDetailView(); - $revision_detail->setRevision($revision); - $revision_detail->setDiff(end($diffs)); - $revision_detail->setAuxiliaryFields($aux_fields); + $revision_detail = id(new DifferentialRevisionDetailView()) + ->setRevision($revision) + ->setDiff(end($diffs)) + ->setAuxiliaryFields($aux_fields) + ->setURI($request->getRequestURI()); $actions = $this->getRevisionActions($revision); diff --git a/src/applications/differential/view/DifferentialRevisionDetailView.php b/src/applications/differential/view/DifferentialRevisionDetailView.php index 364fe796a1..e47e071150 100644 --- a/src/applications/differential/view/DifferentialRevisionDetailView.php +++ b/src/applications/differential/view/DifferentialRevisionDetailView.php @@ -6,6 +6,15 @@ final class DifferentialRevisionDetailView extends AphrontView { private $actions; private $auxiliaryFields = array(); private $diff; + private $uri; + + public function setURI($uri) { + $this->uri = $uri; + return $this; + } + public function getURI() { + return $this->uri; + } public function setDiff(DifferentialDiff $diff) { $this->diff = $diff; @@ -45,7 +54,8 @@ final class DifferentialRevisionDetailView extends AphrontView { $actions = id(new PhabricatorActionListView()) ->setUser($user) - ->setObject($revision); + ->setObject($revision) + ->setObjectURI($this->getURI()); foreach ($this->getActions() as $action) { $obj = id(new PhabricatorActionView()) ->setIcon(idx($action, 'icon', 'edit'))