1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-23 22:10:55 +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; return $this;
} }
public function withApplicationNames(array $application_names) {
$this->applicationNames = $application_names;
return $this;
}
public function withIsStable($is_stable) { public function withIsStable($is_stable) {
$this->isStable = $is_stable; $this->isStable = $is_stable;
return $this; 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) { if ($this->nameContains) {
$needle = phutil_utf8_strtolower($this->nameContains); $needle = phutil_utf8_strtolower($this->nameContains);
foreach ($methods as $key => $method) { foreach ($methods as $key => $method) {

View file

@ -21,11 +21,6 @@ final class PhabricatorConduitSearchEngine
$saved->setParameter('isStable', $request->getStr('isStable')); $saved->setParameter('isStable', $request->getStr('isStable'));
$saved->setParameter('isUnstable', $request->getStr('isUnstable')); $saved->setParameter('isUnstable', $request->getStr('isUnstable'));
$saved->setParameter('isDeprecated', $request->getStr('isDeprecated')); $saved->setParameter('isDeprecated', $request->getStr('isDeprecated'));
$saved->setParameter(
'applicationNames',
$request->getStrList('applicationNames'));
$saved->setParameter('nameContains', $request->getStr('nameContains')); $saved->setParameter('nameContains', $request->getStr('nameContains'));
return $saved; return $saved;
@ -39,11 +34,6 @@ final class PhabricatorConduitSearchEngine
$query->withIsDeprecated($saved->getParameter('isDeprecated')); $query->withIsDeprecated($saved->getParameter('isDeprecated'));
$query->withIsInternal(false); $query->withIsInternal(false);
$names = $saved->getParameter('applicationNames', array());
if ($names) {
$query->withApplicationNames($names);
}
$contains = $saved->getParameter('nameContains'); $contains = $saved->getParameter('nameContains');
if (strlen($contains)) { if (strlen($contains)) {
$query->withNameContains($contains); $query->withNameContains($contains);
@ -63,18 +53,6 @@ final class PhabricatorConduitSearchEngine
->setName('nameContains') ->setName('nameContains')
->setValue($saved->getParameter('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_stable = $saved->getParameter('isStable');
$is_unstable = $saved->getParameter('isUnstable'); $is_unstable = $saved->getParameter('isUnstable');
$is_deprecated = $saved->getParameter('isDeprecated'); $is_deprecated = $saved->getParameter('isDeprecated');