mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-21 04:50:55 +01:00
Fix changeset loading issue for "Download Raw Diff" in Differential
Summary: Fixes T5309. Modernize this callsite to use ChangesetQuery and pick up attached objects. Test Plan: Clicked "Download Raw Diff" in Differential. Reviewers: btrahan, chad Reviewed By: chad Subscribers: epriestley Maniphest Tasks: T5309 Differential Revision: https://secure.phabricator.com/D9461
This commit is contained in:
parent
747946eb5f
commit
0bf19df7c6
1 changed files with 6 additions and 7 deletions
|
@ -673,16 +673,15 @@ final class DifferentialRevisionViewController extends DifferentialController {
|
||||||
DifferentialDiff $diff_vs = null,
|
DifferentialDiff $diff_vs = null,
|
||||||
PhabricatorRepository $repository = null) {
|
PhabricatorRepository $repository = null) {
|
||||||
|
|
||||||
$load_ids = array();
|
$load_diffs = array($target);
|
||||||
if ($diff_vs) {
|
if ($diff_vs) {
|
||||||
$load_ids[] = $diff_vs->getID();
|
$load_diffs[] = $diff_vs;
|
||||||
}
|
}
|
||||||
$load_ids[] = $target->getID();
|
|
||||||
|
|
||||||
$raw_changesets = id(new DifferentialChangeset())
|
$raw_changesets = id(new DifferentialChangesetQuery())
|
||||||
->loadAllWhere(
|
->setViewer($this->getRequest()->getUser())
|
||||||
'diffID IN (%Ld)',
|
->withDiffs($load_diffs)
|
||||||
$load_ids);
|
->execute();
|
||||||
$changeset_groups = mgroup($raw_changesets, 'getDiffID');
|
$changeset_groups = mgroup($raw_changesets, 'getDiffID');
|
||||||
|
|
||||||
$changesets = idx($changeset_groups, $target->getID(), array());
|
$changesets = idx($changeset_groups, $target->getID(), array());
|
||||||
|
|
Loading…
Reference in a new issue