1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-21 22:32:41 +01:00

When using "Update Diff" from the web UI, prefill "Repository" properly

Summary: Ref T9499. When using the manual "Update Diff" workflow on the web, the "Repository" field isn't pre-filled properly. This can lead to revisions losing their repository after a manual update.

Test Plan: Did a manual update of a revision with a repository, saw it stick.

Maniphest Tasks: T9499

Differential Revision: https://secure.phabricator.com/D21638
This commit is contained in:
epriestley 2021-03-17 12:15:09 -07:00
parent ff0a4a2c6f
commit 1d1003af78

View file

@ -27,7 +27,13 @@ final class DifferentialDiffCreateController extends DifferentialController {
$diff = null;
// This object is just for policy stuff
$diff_object = DifferentialDiff::initializeNewDiff($viewer);
$repository_phid = null;
if ($revision) {
$repository_phid = $revision->getRepositoryPHID();
} else {
$repository_phid = null;
}
$errors = array();
$e_diff = null;
$e_file = null;