From 00f192cebb824a6715bf5bb69362f6f78916c9cd Mon Sep 17 00:00:00 2001 From: epriestley Date: Mon, 16 Dec 2013 12:30:51 -0800 Subject: [PATCH] Save ApplicationSearch queries generated from GET parameters in the request Summary: Fixes T4239. Currently, if you go to `/maniphest/?authors=alincoln`, operations dependent on the query key (like "Save Custom Query..." and "Export to Excel...") don't have a query key to work with. Make sure they have one. Also remove a stray `phlog()`. Test Plan: "Save Custom Query...", etc., now work on GET queries. Reviewers: btrahan, chad Reviewed By: btrahan CC: aran Maniphest Tasks: T4239 Differential Revision: https://secure.phabricator.com/D7777 --- .../controller/PhabricatorApplicationSearchController.php | 4 ++++ .../search/engine/PhabricatorApplicationSearchEngine.php | 1 - 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/applications/search/controller/PhabricatorApplicationSearchController.php b/src/applications/search/controller/PhabricatorApplicationSearchController.php index c6c0f2acc0..c96c8c9401 100644 --- a/src/applications/search/controller/PhabricatorApplicationSearchController.php +++ b/src/applications/search/controller/PhabricatorApplicationSearchController.php @@ -147,6 +147,10 @@ final class PhabricatorApplicationSearchController $named_query = idx($engine->loadEnabledNamedQueries(), $query_key); } else { $saved_query = $engine->buildSavedQueryFromRequest($request); + + // Save the query to generate a query key, so "Save Custom Query..." and + // other features like Maniphest's "Export..." work correctly. + $this->saveQuery($saved_query); } $nav->selectFilter( diff --git a/src/applications/search/engine/PhabricatorApplicationSearchEngine.php b/src/applications/search/engine/PhabricatorApplicationSearchEngine.php index d01e526e95..a36f19cf6c 100644 --- a/src/applications/search/engine/PhabricatorApplicationSearchEngine.php +++ b/src/applications/search/engine/PhabricatorApplicationSearchEngine.php @@ -274,7 +274,6 @@ abstract class PhabricatorApplicationSearchEngine { $user_type = PhabricatorPHIDConstants::PHID_TYPE_USER; foreach ($list as $item) { $type = phid_get_type($item); - phlog($type); if ($type == $user_type) { $phids[] = $item; } else if (isset($allow_types[$type])) {