mirror of
https://we.phorge.it/source/phorge.git
synced 2025-01-03 11:21:01 +01:00
cowboy commit -- fixing fatal I introduced from D4174
Summary: we don't always have a diff so instead set an explicit title in the controller. Test Plan: no more fatals. grepped carefully for every call site and tested them all
This commit is contained in:
parent
2f82210e46
commit
86a106d0b1
5 changed files with 24 additions and 3 deletions
|
@ -132,6 +132,8 @@ final class DifferentialDiffViewController extends DifferentialController {
|
||||||
->setVisibleChangesets($changesets)
|
->setVisibleChangesets($changesets)
|
||||||
->setRenderingReferences($refs)
|
->setRenderingReferences($refs)
|
||||||
->setStandaloneURI('/differential/changeset/')
|
->setStandaloneURI('/differential/changeset/')
|
||||||
|
->setDiff($diff)
|
||||||
|
->setTitle('D'.$diff->getID());
|
||||||
->setUser($request->getUser());
|
->setUser($request->getUser());
|
||||||
|
|
||||||
return $this->buildStandardPageResponse(
|
return $this->buildStandardPageResponse(
|
||||||
|
|
|
@ -304,6 +304,7 @@ final class DifferentialRevisionViewController extends DifferentialController {
|
||||||
$changeset_view->setRepository($repository);
|
$changeset_view->setRepository($repository);
|
||||||
}
|
}
|
||||||
$changeset_view->setSymbolIndexes($symbol_indexes);
|
$changeset_view->setSymbolIndexes($symbol_indexes);
|
||||||
|
$changeset_view->setTitle('D'.$target->getID());
|
||||||
|
|
||||||
$diff_history = new DifferentialRevisionUpdateHistoryView();
|
$diff_history = new DifferentialRevisionUpdateHistoryView();
|
||||||
$diff_history->setDiffs($diffs);
|
$diff_history->setDiffs($diffs);
|
||||||
|
|
|
@ -20,6 +20,16 @@ final class DifferentialChangesetListView extends AphrontView {
|
||||||
private $diff;
|
private $diff;
|
||||||
private $vsMap = array();
|
private $vsMap = array();
|
||||||
|
|
||||||
|
private $title;
|
||||||
|
|
||||||
|
public function setTitle($title) {
|
||||||
|
$this->title = $title;
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
private function getTitle() {
|
||||||
|
return $this->title;
|
||||||
|
}
|
||||||
|
|
||||||
public function setBranch($branch) {
|
public function setBranch($branch) {
|
||||||
$this->branch = $branch;
|
$this->branch = $branch;
|
||||||
return $this;
|
return $this;
|
||||||
|
@ -190,7 +200,7 @@ final class DifferentialChangesetListView extends AphrontView {
|
||||||
|
|
||||||
return
|
return
|
||||||
id(new PhabricatorHeaderView())
|
id(new PhabricatorHeaderView())
|
||||||
->setHeader('D'.$this->diff->getID())
|
->setHeader($this->getTitle())
|
||||||
->render().
|
->render().
|
||||||
phutil_render_tag(
|
phutil_render_tag(
|
||||||
'div',
|
'div',
|
||||||
|
|
|
@ -14,13 +14,16 @@ final class DiffusionChangeController extends DiffusionController {
|
||||||
// TODO: Refine this.
|
// TODO: Refine this.
|
||||||
return new Aphront404Response();
|
return new Aphront404Response();
|
||||||
}
|
}
|
||||||
|
|
||||||
$callsign = $drequest->getRepository()->getCallsign();
|
$repository = $drequest->getRepository();
|
||||||
|
$callsign = $repository->getCallsign();
|
||||||
|
$commit = $drequest->getRawCommit();
|
||||||
$changesets = array(
|
$changesets = array(
|
||||||
0 => $changeset,
|
0 => $changeset,
|
||||||
);
|
);
|
||||||
|
|
||||||
$changeset_view = new DifferentialChangesetListView();
|
$changeset_view = new DifferentialChangesetListView();
|
||||||
|
$changeset_view->setTitle(DiffusionView::nameCommit($repository, $commit));
|
||||||
$changeset_view->setChangesets($changesets);
|
$changeset_view->setChangesets($changesets);
|
||||||
$changeset_view->setVisibleChangesets($changesets);
|
$changeset_view->setVisibleChangesets($changesets);
|
||||||
$changeset_view->setRenderingReferences(
|
$changeset_view->setRenderingReferences(
|
||||||
|
|
|
@ -257,7 +257,12 @@ final class DiffusionCommitController extends DiffusionController {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$change_list_title = DiffusionView::nameCommit(
|
||||||
|
$repository,
|
||||||
|
$commit->getCommitIdentifier()
|
||||||
|
);
|
||||||
$change_list = new DifferentialChangesetListView();
|
$change_list = new DifferentialChangesetListView();
|
||||||
|
$change_list->setTitle($change_list_title);
|
||||||
$change_list->setChangesets($changesets);
|
$change_list->setChangesets($changesets);
|
||||||
$change_list->setVisibleChangesets($visible_changesets);
|
$change_list->setVisibleChangesets($visible_changesets);
|
||||||
$change_list->setRenderingReferences($references);
|
$change_list->setRenderingReferences($references);
|
||||||
|
|
Loading…
Reference in a new issue