diff --git a/src/applications/paste/controller/PhabricatorPasteListController.php b/src/applications/paste/controller/PhabricatorPasteListController.php index 0706e00f3d..8243a8f71a 100644 --- a/src/applications/paste/controller/PhabricatorPasteListController.php +++ b/src/applications/paste/controller/PhabricatorPasteListController.php @@ -22,7 +22,7 @@ final class PhabricatorPasteListController extends PhabricatorPasteController { if ($request->isFormPost()) { return id(new AphrontRedirectResponse())->setURI( $engine->getQueryResultsPageURI( - $engine->buildSavedQueryFromRequest($request))); + $engine->buildSavedQueryFromRequest($request)->getQueryKey())); } $nav = $this->buildSideNavView(); diff --git a/src/applications/paste/controller/PhabricatorPasteQueriesController.php b/src/applications/paste/controller/PhabricatorPasteQueriesController.php index 11a71a0340..75530fe1d8 100644 --- a/src/applications/paste/controller/PhabricatorPasteQueriesController.php +++ b/src/applications/paste/controller/PhabricatorPasteQueriesController.php @@ -31,7 +31,7 @@ final class PhabricatorPasteQueriesController $item = id(new PhabricatorObjectItemView()) ->setHeader($named_query->getQueryName()) - ->setHref('/paste/query/'.$named_query->getQueryKey().'/'); + ->setHref($engine->getQueryResultsPageURI($named_query->getQueryKey())); if ($named_query->getIsBuiltin()) { $item->addIcon('lock-grey', pht('Builtin')); diff --git a/src/applications/paste/query/PhabricatorPasteSearchEngine.php b/src/applications/paste/query/PhabricatorPasteSearchEngine.php index 305a15968d..2f2c652920 100644 --- a/src/applications/paste/query/PhabricatorPasteSearchEngine.php +++ b/src/applications/paste/query/PhabricatorPasteSearchEngine.php @@ -80,8 +80,8 @@ final class PhabricatorPasteSearchEngine return $form; } - public function getQueryResultsPageURI(PhabricatorSavedQuery $query) { - return '/paste/query/'.$query->getQueryKey().'/'; + public function getQueryResultsPageURI($query_key) { + return '/paste/query/'.$query_key.'/'; } public function getQueryManagementURI() { diff --git a/src/applications/search/controller/PhabricatorSearchEditController.php b/src/applications/search/controller/PhabricatorSearchEditController.php index b4b448cbd1..e9753d314a 100644 --- a/src/applications/search/controller/PhabricatorSearchEditController.php +++ b/src/applications/search/controller/PhabricatorSearchEditController.php @@ -44,7 +44,8 @@ final class PhabricatorSearchEditController // If we haven't saved the query yet, this is a "Save..." operation, so // take the user back to the query if they cancel instead of back to the // management interface. - $cancel_uri = $engine->getQueryResultsPageURI($saved_query); + $cancel_uri = $engine->getQueryResultsPageURI( + $saved_query->getQueryKey()); } $e_name = true; diff --git a/src/applications/search/engine/PhabricatorApplicationSearchEngine.php b/src/applications/search/engine/PhabricatorApplicationSearchEngine.php index 07a3676009..edfe8b1f4f 100644 --- a/src/applications/search/engine/PhabricatorApplicationSearchEngine.php +++ b/src/applications/search/engine/PhabricatorApplicationSearchEngine.php @@ -56,11 +56,11 @@ abstract class PhabricatorApplicationSearchEngine { * Return an application URI corresponding to the results page of a query. * Normally, this is something like `/application/query/QUERYKEY/`. * - * @param PhabricatorSavedQuery The query to build a URI for. - * @return string URI where the query can be executed. + * @param string The query key to build a URI for. + * @return string URI where the query can be executed. * @task uri */ - abstract public function getQueryResultsPageURI(PhabricatorSavedQuery $query); + abstract public function getQueryResultsPageURI($query_key); /**