1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2025-01-22 20:51:10 +01:00

Provide a hint about how to quote search terms containing literal colons

Summary: See <https://phabricator.wikimedia.org/T243483>. Provide a more direct path forward if users hit the "unknown function" error but are trying to search for a term with a colon in it.

Test Plan:
{F7414068}

{F7414067}

Differential Revision: https://secure.phabricator.com/D21209
This commit is contained in:
epriestley 2020-05-03 09:32:13 -07:00
parent 6f09edeb91
commit dade977307

View file

@ -34,7 +34,9 @@ abstract class PhabricatorFerretEngine extends Phobject {
if (!isset($this->ferretFunctions[$normalized_name])) {
throw new PhutilSearchQueryCompilerSyntaxException(
pht(
'Unknown search function "%s". Supported functions are: %s.',
'Unknown search function "%s". Supported functions are: %s. '.
'(To search for a term containing a colon, surround the term '.
'in double quotes.)',
$raw_name,
implode(', ', array_keys($this->ferretFunctions))));
}