mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-27 16:00:59 +01:00
Fix a URI construction exception when filtering the Maniphest Burnup chart by project
Summary: See <https://discourse.phabricator-community.org/t/filtering-burnup-rate-by-project-produces-exception/2442>. Test Plan: Viewed Maniphest burnup chart, filtered by project: no more URI construction exception. Reviewers: amckinley Reviewed By: amckinley Differential Revision: https://secure.phabricator.com/D20207
This commit is contained in:
parent
01d0fc443a
commit
66161feb13
1 changed files with 11 additions and 2 deletions
|
@ -13,10 +13,19 @@ final class ManiphestReportController extends ManiphestController {
|
|||
|
||||
$project = head($request->getArr('set_project'));
|
||||
$project = nonempty($project, null);
|
||||
$uri = $uri->alter('project', $project);
|
||||
|
||||
if ($project !== null) {
|
||||
$uri->replaceQueryParam('project', $project);
|
||||
} else {
|
||||
$uri->removeQueryParam('project');
|
||||
}
|
||||
|
||||
$window = $request->getStr('set_window');
|
||||
$uri = $uri->alter('window', $window);
|
||||
if ($window !== null) {
|
||||
$uri->replaceQueryParam('window', $window);
|
||||
} else {
|
||||
$uri->removeQueryParam('window');
|
||||
}
|
||||
|
||||
return id(new AphrontRedirectResponse())->setURI($uri);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue