1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-10 17:02:41 +01:00

Clean up a PhutilURI "alter()" callsite in Diffusion blame

Summary: See <https://discourse.phabricator-community.org/t/exception-when-viewing-previous-revision-from-blame/2454/2>.

Test Plan: Viewed blame, clicked "Skip Past This Commit". Got jumped to the right place instead of a URI exception.

Reviewers: amckinley

Reviewed By: amckinley

Differential Revision: https://secure.phabricator.com/D20222
This commit is contained in:
epriestley 2019-02-28 05:43:13 -08:00
parent 620047bcfe
commit 4cc556b576

View file

@ -709,8 +709,17 @@ final class DiffusionBrowseController extends DiffusionController {
'path' => $path,
));
$before_uri = $before_uri->alter('renamed', $renamed);
$before_uri = $before_uri->alter('follow', $follow);
if ($renamed === null) {
$before_uri->removeQueryParam('renamed');
} else {
$before_uri->replaceQueryParam('renamed', $renamed);
}
if ($follow === null) {
$before_uri->removeQueryParam('follow');
} else {
$before_uri->replaceQueryParam('follow', $follow);
}
return id(new AphrontRedirectResponse())->setURI($before_uri);
}