mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-30 01:10:58 +01:00
Fix Maniphest Next button not working when default query has 100+ results.
Summary: If there is no /query in the URL, the default query would be lost when clicking Next, causing the search form to be shown on the second page. This is not so likely to happen on a standard Phabricator installation because the default query is Assigned, and few people will have 100+ tasks assigned. Test Plan: * Go to /maniphest/query/edit/ * Move Open Tasks to the top * Go to /maniphest/ * Click Next on the bottom right * See only tasks that are actually open Reviewers: epriestley, #blessed_reviewers Reviewed By: epriestley CC: Korvin, epriestley, aran Differential Revision: https://secure.phabricator.com/D7667
This commit is contained in:
parent
8f48968c6e
commit
bf2f599abb
1 changed files with 17 additions and 4 deletions
|
@ -107,11 +107,24 @@ final class PhabricatorApplicationSearchController
|
|||
$run_query = false;
|
||||
$query_key = $request->getStr('query');
|
||||
} else if (!strlen($this->queryKey)) {
|
||||
if ($request->isHTTPGet() && $request->getPassthroughRequestData()) {
|
||||
$found_query_data = false;
|
||||
|
||||
if ($request->isHTTPGet()) {
|
||||
// If this is a GET request and it has some query data, don't
|
||||
// do anything. We'll build and execute a query from it below.
|
||||
// This allows external tools to build URIs like "/query/?users=a,b".
|
||||
} else {
|
||||
// do anything unless it's only before= or after=. We'll build and
|
||||
// execute a query from it below. This allows external tools to build
|
||||
// URIs like "/query/?users=a,b".
|
||||
$pt_data = $request->getPassthroughRequestData();
|
||||
|
||||
foreach ($pt_data as $pt_key => $pt_value) {
|
||||
if ($pt_key != 'before' && $pt_key != 'after') {
|
||||
$found_query_data = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!$found_query_data) {
|
||||
// Otherwise, there's no query data so just run the user's default
|
||||
// query for this application.
|
||||
$query_key = head_key($engine->loadEnabledNamedQueries());
|
||||
|
|
Loading…
Reference in a new issue