From 252703305758e2ed0e6257ae94fdb3b4b90f7184 Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Sat, 3 Jan 2026 16:52:33 +0100 Subject: Fix unwanted expansion of user queries in some cases (#8395) fix https://github.com/FreshRSS/FreshRSS/issues/8378 --- app/Controllers/indexController.php | 6 +++--- app/Controllers/subscriptionController.php | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'app/Controllers') diff --git a/app/Controllers/indexController.php b/app/Controllers/indexController.php index 0d704c496..ca88c9171 100644 --- a/app/Controllers/indexController.php +++ b/app/Controllers/indexController.php @@ -94,8 +94,8 @@ class FreshRSS_index_Controller extends FreshRSS_ActionController { }; $searchString = $operator . ':' . ($offset < 0 ? '/' : '') . date('Y-m-d', $timestamp + ($offset * 86400)) . ($offset > 0 ? '/' : ''); return Minz_Url::display(Minz_Request::modifiedCurrentRequest([ - 'search' => FreshRSS_Context::$search->__toString() === '' ? $searchString : - FreshRSS_Context::$search->enforce(new FreshRSS_Search($searchString))->__toString(), + 'search' => FreshRSS_Context::$search->toString() === '' ? $searchString : + FreshRSS_Context::$search->enforce(new FreshRSS_Search($searchString))->toString(), ])); } @@ -135,7 +135,7 @@ class FreshRSS_index_Controller extends FreshRSS_ActionController { $this->view->rss_title = FreshRSS_Context::$name . ' | ' . FreshRSS_View::title(); $title = FreshRSS_Context::$name; - $search = FreshRSS_Context::$search->__toString(); + $search = FreshRSS_Context::$search->toString(expandUserQueries: false); if ($search !== '') { $title = '“' . htmlspecialchars($search, ENT_COMPAT, 'UTF-8') . '”'; } diff --git a/app/Controllers/subscriptionController.php b/app/Controllers/subscriptionController.php index 02942583f..eb9fbf58f 100644 --- a/app/Controllers/subscriptionController.php +++ b/app/Controllers/subscriptionController.php @@ -421,7 +421,7 @@ class FreshRSS_subscription_Controller extends FreshRSS_ActionController { $actionsSearch = new FreshRSS_BooleanSearch('', operator: 'AND'); foreach ($filteractions as $action) { $actionSearch = new FreshRSS_BooleanSearch($action, operator: 'OR'); - if ($actionSearch->__toString() === '') { + if ($actionSearch->toString() === '') { continue; } $actionsSearch->add($actionSearch); @@ -433,7 +433,7 @@ class FreshRSS_subscription_Controller extends FreshRSS_ActionController { 'c' => 'index', 'a' => 'index', 'params' => [ - 'search' => $search->__toString(), + 'search' => $search->toString(), ], ], redirect: true); } -- cgit v1.2.3