1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2025-01-11 07:11:04 +01:00

Remove "Name Contains" query constraint from Diffusion for Repositories

Summary:
Ref T12819. Obsoleted by the Ferret engine "Query" field.

This is a compatibility break, I'll note it in the changelog.

Test Plan: Searched for repositories by name with "Query" instead of "Name Contains".

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T12819

Differential Revision: https://secure.phabricator.com/D18588
This commit is contained in:
epriestley 2017-09-11 16:30:35 -07:00
parent 6edf98eb3b
commit dd3f05ec25
2 changed files with 0 additions and 20 deletions

View file

@ -8,7 +8,6 @@ final class PhabricatorRepositoryQuery
private $callsigns; private $callsigns;
private $types; private $types;
private $uuids; private $uuids;
private $nameContains;
private $uris; private $uris;
private $datasourceQuery; private $datasourceQuery;
private $slugs; private $slugs;
@ -116,11 +115,6 @@ final class PhabricatorRepositoryQuery
return $this; return $this;
} }
public function withNameContains($contains) {
$this->nameContains = $contains;
return $this;
}
public function withURIs(array $uris) { public function withURIs(array $uris) {
$this->uris = $uris; $this->uris = $uris;
return $this; return $this;
@ -661,13 +655,6 @@ final class PhabricatorRepositoryQuery
$this->uuids); $this->uuids);
} }
if (strlen($this->nameContains)) {
$where[] = qsprintf(
$conn,
'r.name LIKE %~',
$this->nameContains);
}
if (strlen($this->datasourceQuery)) { if (strlen($this->datasourceQuery)) {
// This handles having "rP" match callsigns starting with "P...". // This handles having "rP" match callsigns starting with "P...".
$query = trim($this->datasourceQuery); $query = trim($this->datasourceQuery);

View file

@ -24,9 +24,6 @@ final class PhabricatorRepositorySearchEngine
id(new PhabricatorSearchStringListField()) id(new PhabricatorSearchStringListField())
->setLabel(pht('Callsigns')) ->setLabel(pht('Callsigns'))
->setKey('callsigns'), ->setKey('callsigns'),
id(new PhabricatorSearchTextField())
->setLabel(pht('Name Contains'))
->setKey('name'),
id(new PhabricatorSearchSelectField()) id(new PhabricatorSearchSelectField())
->setLabel(pht('Status')) ->setLabel(pht('Status'))
->setKey('status') ->setKey('status')
@ -72,10 +69,6 @@ final class PhabricatorRepositorySearchEngine
$query->withTypes($map['types']); $query->withTypes($map['types']);
} }
if (strlen($map['name'])) {
$query->withNameContains($map['name']);
}
if ($map['uris']) { if ($map['uris']) {
$query->withURIs($map['uris']); $query->withURIs($map['uris']);
} }