Page MenuHomePhabricator

D7667.diff

diff --git a/src/applications/search/controller/PhabricatorApplicationSearchController.php b/src/applications/search/controller/PhabricatorApplicationSearchController.php
--- a/src/applications/search/controller/PhabricatorApplicationSearchController.php
+++ b/src/applications/search/controller/PhabricatorApplicationSearchController.php
@@ -107,11 +107,24 @@
$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());

File Metadata

Mime Type
text/x-diff
Storage Engine
amazon-s3
Storage Format
Raw Data
Storage Handle
phabricator/ax/s3/wpaw3r63e3mjb5wm
Default Alt Text
D7667.diff (1 KB)

Event Timeline