1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2025-01-23 05:01:13 +01:00

(stable) Fix a PhutilURI issue in workboards

Ref PHI1082.
This commit is contained in:
epriestley 2019-02-19 09:01:10 -08:00
parent d4f28640eb
commit 884b8bd694

View file

@ -1182,19 +1182,27 @@ final class PhabricatorProjectBoardViewController
$project = $this->getProject(); $project = $this->getProject();
if ($base === null) { if ($base === null) {
$base = $this->getRequest()->getRequestURI(); $base = $this->getRequest()->getPath();
} }
$base = new PhutilURI($base); $base = new PhutilURI($base);
if ($force || ($this->sortKey != $this->getDefaultSort($project))) { 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 { } else {
$base->removeQueryParam('order'); $base->removeQueryParam('order');
} }
if ($force || ($this->queryKey != $this->getDefaultFilter($project))) { 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 { } else {
$base->removeQueryParam('filter'); $base->removeQueryParam('filter');
} }