mirror of
https://we.phorge.it/source/phorge.git
synced 2025-01-07 05:11:05 +01:00
(stable) Fix URI construction of typeahead browse "more" pager
Summary: Ref T13251. See <https://phabricator.wikimedia.org/T216849>. Test Plan: - With more than 100 projects (or, set `$limit = 3`)... - Edit a task, then click the "Browse" magnifying glass icon next to the "Tags" typeahead. - Before change: fatal on 'q' being null. - After change: no fatal. Reviewers: amckinley, 20after4 Reviewed By: amckinley Maniphest Tasks: T13251 Differential Revision: https://secure.phabricator.com/D20204
This commit is contained in:
parent
884b8bd694
commit
a08a03876f
1 changed files with 12 additions and 2 deletions
|
@ -127,10 +127,20 @@ final class PhabricatorTypeaheadModularDatasourceController
|
|||
if (($offset + (2 * $limit)) < $hard_limit) {
|
||||
$next_uri = id(new PhutilURI($request->getRequestURI()))
|
||||
->replaceQueryParam('offset', $offset + $limit)
|
||||
->replaceQueryParam('q', $query)
|
||||
->replaceQueryParam('raw', $raw_query)
|
||||
->replaceQueryParam('format', 'html');
|
||||
|
||||
if ($query !== null) {
|
||||
$next_uri->replaceQueryParam('q', $query);
|
||||
} else {
|
||||
$next_uri->removeQueryParam('q');
|
||||
}
|
||||
|
||||
if ($raw_query !== null) {
|
||||
$next_uri->replaceQueryParam('raw', $raw_query);
|
||||
} else {
|
||||
$next_uri->removeQueryParam('raw');
|
||||
}
|
||||
|
||||
$next_link = javelin_tag(
|
||||
'a',
|
||||
array(
|
||||
|
|
Loading…
Reference in a new issue