mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-19 03:50:54 +01:00
Unbreak regex filename search
Summary: D9087 adds a nice typeahead but breaks the existing regex search by quoting the pattern. Ideally, this change won't break the typeahead, which as far as I can tell doesn't use the `pattern` argument. Test Plan: Not yet. RFC as to whether this change makes sense, will fix my local setup and resend if so. Reviewers: epriestley, #blessed_reviewers Reviewed By: epriestley, #blessed_reviewers Subscribers: Korvin Differential Revision: https://secure.phabricator.com/D15500
This commit is contained in:
parent
76f07ec80b
commit
130e1d1f68
1 changed files with 2 additions and 1 deletions
|
@ -79,7 +79,8 @@ final class DiffusionQueryPathsConduitAPIMethod
|
|||
$offset = (int)$request->getValue('offset');
|
||||
|
||||
if (strlen($pattern)) {
|
||||
$pattern = '/'.preg_quote($pattern, '/').'/';
|
||||
// Add delimiters to the regex pattern.
|
||||
$pattern = '('.$pattern.')';
|
||||
}
|
||||
|
||||
$results = array();
|
||||
|
|
Loading…
Reference in a new issue