diff options
| author | 2022-06-02 08:41:08 +0200 | |
|---|---|---|
| committer | 2022-06-02 08:41:08 +0200 | |
| commit | f85c510ed49be031145f6b35e815ce890cd4f9aa (patch) | |
| tree | c7ac947ba5ddacf85dc5d97330f38f7d91b0964c /app/Models/UserQuery.php | |
| parent | f988b996ab69104bc45b222fa88d34b5c78f98b3 (diff) | |
New search engine (#4378)
* New possibility to invoke user queries from a search expression
From the search field: `S:"My query"`.
Can be combined with other filters such as `S:"My query" date:P3d` as long as the user queries do not contain `OR`.
A use-case is to have an RSS filter with a stable address or an external API call with the ability to update the user query.
* Draft of parenthesis logic
* More draft
* Working parenthesis (a OR b) (c OR d)
* Working (A) OR (B)
* Support nested parentheses + unit tests + documentation
* search:MySearch and S:3
Diffstat (limited to 'app/Models/UserQuery.php')
| -rw-r--r-- | app/Models/UserQuery.php | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/app/Models/UserQuery.php b/app/Models/UserQuery.php index 236813942..964324bf7 100644 --- a/app/Models/UserQuery.php +++ b/app/Models/UserQuery.php @@ -14,6 +14,7 @@ class FreshRSS_UserQuery { private $get_type; private $name; private $order; + /** @var FreshRSS_BooleanSearch */ private $search; private $state; private $url; @@ -34,7 +35,7 @@ class FreshRSS_UserQuery { $this->parseGet($query['get']); } if (isset($query['name'])) { - $this->name = $query['name']; + $this->name = trim($query['name']); } if (isset($query['order'])) { $this->order = $query['order']; @@ -42,7 +43,7 @@ class FreshRSS_UserQuery { if (empty($query['url'])) { if (!empty($query)) { unset($query['name']); - $this->url = Minz_Url::display(array('params' => $query)); + $this->url = Minz_Url::display(['params' => $query]); } } else { $this->url = $query['url']; |
