From 884b8bd694f06cea25fcf3496c2f537a98a84fa3 Mon Sep 17 00:00:00 2001 From: epriestley Date: Tue, 19 Feb 2019 09:01:10 -0800 Subject: [PATCH] (stable) Fix a PhutilURI issue in workboards Ref PHI1082. --- .../PhabricatorProjectBoardViewController.php | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/src/applications/project/controller/PhabricatorProjectBoardViewController.php b/src/applications/project/controller/PhabricatorProjectBoardViewController.php index ee239035da..f2965892d7 100644 --- a/src/applications/project/controller/PhabricatorProjectBoardViewController.php +++ b/src/applications/project/controller/PhabricatorProjectBoardViewController.php @@ -1182,19 +1182,27 @@ final class PhabricatorProjectBoardViewController $project = $this->getProject(); if ($base === null) { - $base = $this->getRequest()->getRequestURI(); + $base = $this->getRequest()->getPath(); } $base = new PhutilURI($base); if ($force || ($this->sortKey != $this->getDefaultSort($project))) { - $base->replaceQueryParam('order', $this->sortKey); + if ($this->sortKey !== null) { + $base->replaceQueryParam('order', $this->sortKey); + } else { + $base->removeQueryParam('order'); + } } else { $base->removeQueryParam('order'); } if ($force || ($this->queryKey != $this->getDefaultFilter($project))) { - $base->replaceQueryParam('filter', $this->queryKey); + if ($this->queryKey !== null) { + $base->replaceQueryParam('filter', $this->queryKey); + } else { + $base->removeQueryParam('filter'); + } } else { $base->removeQueryParam('filter'); }