1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2025-01-04 11:51:02 +01:00

Clean up some more carnage from D6416

Summary: rPad17c99c1b0222292a47ca79561a356cb8b5a5d5 stopped the fatal and this provides the forward fix. I think this is what a forward fix is anyway.

Test Plan: viewed a revision (D63 is my boy) and no fatals

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D6448
This commit is contained in:
Bob Trahan 2013-07-13 10:33:32 -07:00
parent ad17c99c1b
commit e4725832c4
2 changed files with 16 additions and 5 deletions

View file

@ -223,10 +223,11 @@ final class DifferentialRevisionViewController extends DifferentialController {
$visible_changesets = $changesets; $visible_changesets = $changesets;
} }
$revision_detail = new DifferentialRevisionDetailView(); $revision_detail = id(new DifferentialRevisionDetailView())
$revision_detail->setRevision($revision); ->setRevision($revision)
$revision_detail->setDiff(end($diffs)); ->setDiff(end($diffs))
$revision_detail->setAuxiliaryFields($aux_fields); ->setAuxiliaryFields($aux_fields)
->setURI($request->getRequestURI());
$actions = $this->getRevisionActions($revision); $actions = $this->getRevisionActions($revision);

View file

@ -6,6 +6,15 @@ final class DifferentialRevisionDetailView extends AphrontView {
private $actions; private $actions;
private $auxiliaryFields = array(); private $auxiliaryFields = array();
private $diff; private $diff;
private $uri;
public function setURI($uri) {
$this->uri = $uri;
return $this;
}
public function getURI() {
return $this->uri;
}
public function setDiff(DifferentialDiff $diff) { public function setDiff(DifferentialDiff $diff) {
$this->diff = $diff; $this->diff = $diff;
@ -45,7 +54,8 @@ final class DifferentialRevisionDetailView extends AphrontView {
$actions = id(new PhabricatorActionListView()) $actions = id(new PhabricatorActionListView())
->setUser($user) ->setUser($user)
->setObject($revision); ->setObject($revision)
->setObjectURI($this->getURI());
foreach ($this->getActions() as $action) { foreach ($this->getActions() as $action) {
$obj = id(new PhabricatorActionView()) $obj = id(new PhabricatorActionView())
->setIcon(idx($action, 'icon', 'edit')) ->setIcon(idx($action, 'icon', 'edit'))