From 00c61cf34c3f9a59b4dc16a4accd7cf85945a5a6 Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Wed, 24 Dec 2025 01:19:06 +0100 Subject: Fix serialisation of dates in searches (#8341) Dates should not be expanded/resolved in string serialisations of search expressions, as it otherwise break relative user queries such as `P30D`. Fix of https://github.com/FreshRSS/FreshRSS/pull/8293 --- tests/app/Models/SearchTest.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'tests') diff --git a/tests/app/Models/SearchTest.php b/tests/app/Models/SearchTest.php index 213fdde45..9e107a79d 100644 --- a/tests/app/Models/SearchTest.php +++ b/tests/app/Models/SearchTest.php @@ -956,8 +956,8 @@ final class SearchTest extends \PHPUnit\Framework\TestCase { /search_regex/i "quoted search" search -e:3,4 -f:12,13 -c:22,23 -L:32,33 -labels:"Not label,Not other label" -userdate:2025-06-01T00:00:00/2025-09-01T00:00:00 - -pubdate:2025-06-01T00:00:00/2025-09-01T00:00:00 - -date:2025-06-01T00:00:00/2025-09-01T00:00:00 + -pubdate:2025 + -date:P30D -intitle:/Spam/i -intitle:"'bad" -intext:/Spam/i -intext:"'bad" -author:/Dave/i -author:Charlie @@ -1070,8 +1070,8 @@ final class SearchTest extends \PHPUnit\Framework\TestCase { ['(a b) OR (c d)', 'e', 'e ((a b) OR (c d))'], ['(a b) (c d)', 'e', 'e ((a b) (c d))'], ['(a b)', 'e', 'e (a b)'], - ['date:2024/', 'date:/2025', 'date:/2025-12-31T23:59:59'], - ['a', 'date:/2025', 'date:/2025-12-31T23:59:59 a'], + ['date:2024/', 'date:/2025', 'date:/2025'], + ['a', 'date:/2025', 'date:/2025 a'], ]; } -- cgit v1.2.3