1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-10 08:52:39 +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 $types;
private $uuids;
private $nameContains;
private $uris;
private $datasourceQuery;
private $slugs;
@ -116,11 +115,6 @@ final class PhabricatorRepositoryQuery
return $this;
}
public function withNameContains($contains) {
$this->nameContains = $contains;
return $this;
}
public function withURIs(array $uris) {
$this->uris = $uris;
return $this;
@ -661,13 +655,6 @@ final class PhabricatorRepositoryQuery
$this->uuids);
}
if (strlen($this->nameContains)) {
$where[] = qsprintf(
$conn,
'r.name LIKE %~',
$this->nameContains);
}
if (strlen($this->datasourceQuery)) {
// This handles having "rP" match callsigns starting with "P...".
$query = trim($this->datasourceQuery);

View file

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