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
This commit is contained in:
@@ -147,6 +147,10 @@ final class PhabricatorApplicationSearchController
|
|||||||
$named_query = idx($engine->loadEnabledNamedQueries(), $query_key);
|
$named_query = idx($engine->loadEnabledNamedQueries(), $query_key);
|
||||||
} else {
|
} else {
|
||||||
$saved_query = $engine->buildSavedQueryFromRequest($request);
|
$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(
|
$nav->selectFilter(
|
||||||
|
|||||||
@@ -274,7 +274,6 @@ abstract class PhabricatorApplicationSearchEngine {
|
|||||||
$user_type = PhabricatorPHIDConstants::PHID_TYPE_USER;
|
$user_type = PhabricatorPHIDConstants::PHID_TYPE_USER;
|
||||||
foreach ($list as $item) {
|
foreach ($list as $item) {
|
||||||
$type = phid_get_type($item);
|
$type = phid_get_type($item);
|
||||||
phlog($type);
|
|
||||||
if ($type == $user_type) {
|
if ($type == $user_type) {
|
||||||
$phids[] = $item;
|
$phids[] = $item;
|
||||||
} else if (isset($allow_types[$type])) {
|
} else if (isset($allow_types[$type])) {
|
||||||
|
|||||||
Reference in New Issue
Block a user