From 6649b0cef89039aa87a1319a96aaa328219fd0e0 Mon Sep 17 00:00:00 2001 From: Josh Cox Date: Tue, 27 Sep 2016 01:18:11 -0400 Subject: [PATCH] Remove "Application" field from ConduitSearchEngine Summary: Fixes T9063. Removes the "Application" field from the search because it was largely redundant with the 'Name Contains' field. Test Plan: Went to `/conduit/query/modern/`, clicked on `Edit Query` and noted that there is no "Application" field anymore. The 'Name Contains' field still works however. Reviewers: epriestley, #blessed_reviewers Reviewed By: epriestley, #blessed_reviewers Subscribers: Korvin, epriestley, yelirekim Maniphest Tasks: T9063 Differential Revision: https://secure.phabricator.com/D16602 --- .../query/PhabricatorConduitMethodQuery.php | 16 -------------- .../query/PhabricatorConduitSearchEngine.php | 22 ------------------- 2 files changed, 38 deletions(-) diff --git a/src/applications/conduit/query/PhabricatorConduitMethodQuery.php b/src/applications/conduit/query/PhabricatorConduitMethodQuery.php index 512dc70e6f..0409e4ceb3 100644 --- a/src/applications/conduit/query/PhabricatorConduitMethodQuery.php +++ b/src/applications/conduit/query/PhabricatorConduitMethodQuery.php @@ -21,11 +21,6 @@ final class PhabricatorConduitMethodQuery return $this; } - public function withApplicationNames(array $application_names) { - $this->applicationNames = $application_names; - return $this; - } - public function withIsStable($is_stable) { $this->isStable = $is_stable; return $this; @@ -86,17 +81,6 @@ final class PhabricatorConduitMethodQuery } } - if ($this->applicationNames) { - $map = array_fuse($this->applicationNames); - foreach ($methods as $key => $method) { - $needle = $method->getApplicationName(); - $needle = phutil_utf8_strtolower($needle); - if (empty($map[$needle])) { - unset($methods[$key]); - } - } - } - if ($this->nameContains) { $needle = phutil_utf8_strtolower($this->nameContains); foreach ($methods as $key => $method) { diff --git a/src/applications/conduit/query/PhabricatorConduitSearchEngine.php b/src/applications/conduit/query/PhabricatorConduitSearchEngine.php index 22e4e19e53..3c01005722 100644 --- a/src/applications/conduit/query/PhabricatorConduitSearchEngine.php +++ b/src/applications/conduit/query/PhabricatorConduitSearchEngine.php @@ -21,11 +21,6 @@ final class PhabricatorConduitSearchEngine $saved->setParameter('isStable', $request->getStr('isStable')); $saved->setParameter('isUnstable', $request->getStr('isUnstable')); $saved->setParameter('isDeprecated', $request->getStr('isDeprecated')); - - $saved->setParameter( - 'applicationNames', - $request->getStrList('applicationNames')); - $saved->setParameter('nameContains', $request->getStr('nameContains')); return $saved; @@ -39,11 +34,6 @@ final class PhabricatorConduitSearchEngine $query->withIsDeprecated($saved->getParameter('isDeprecated')); $query->withIsInternal(false); - $names = $saved->getParameter('applicationNames', array()); - if ($names) { - $query->withApplicationNames($names); - } - $contains = $saved->getParameter('nameContains'); if (strlen($contains)) { $query->withNameContains($contains); @@ -63,18 +53,6 @@ final class PhabricatorConduitSearchEngine ->setName('nameContains') ->setValue($saved->getParameter('nameContains'))); - $names = $saved->getParameter('applicationNames', array()); - $form - ->appendChild( - id(new AphrontFormTextControl()) - ->setLabel(pht('Applications')) - ->setName('applicationNames') - ->setValue(implode(', ', $names)) - ->setCaption( - pht( - 'Example: %s', - phutil_tag('tt', array(), 'differential, paste')))); - $is_stable = $saved->getParameter('isStable'); $is_unstable = $saved->getParameter('isUnstable'); $is_deprecated = $saved->getParameter('isDeprecated');