1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-19 03:50:54 +01:00

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
This commit is contained in:
Josh Cox 2016-09-27 01:18:11 -04:00
parent fc82118848
commit 6649b0cef8
2 changed files with 0 additions and 38 deletions

View file

@ -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) {

View file

@ -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');