From 52a692eb5728f19b5a274d5e9ac58968a4167d99 Mon Sep 17 00:00:00 2001 From: Mattia Date: Sat, 21 Nov 2026 11:58:55 +0100 Subject: [PATCH] [3.0] Fold PM author search values on PostgreSQL Use the database-aware string_ci placeholder alongside column_ci when matching member and guest author names in personal message search. This preserves MySQL behavior and ensures both operands are folded on PostgreSQL. Fixes #9598 Signed-off-by: Mattia Agostini --- Sources/PersonalMessage/Search.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Sources/PersonalMessage/Search.php b/Sources/PersonalMessage/Search.php index db86321120..a643f9dfb6 100644 --- a/Sources/PersonalMessage/Search.php +++ b/Sources/PersonalMessage/Search.php @@ -478,7 +478,7 @@ protected function setUserQuery(): void foreach ($possible_users as $k => $v) { $where_params['name_' . $k] = $v; - $where_clause[] = '{column_ci:real_name} LIKE {string:name_' . $k . '}'; + $where_clause[] = '{column_ci:real_name} LIKE {string_ci:name_' . $k . '}'; } // Who matches those criteria? @@ -498,7 +498,7 @@ protected function setUserQuery(): void foreach ($possible_users as $k => $v) { $this->searchq_parameters['name_' . $k] = $v; - $clauses[] = '{column_ci:pm.from_name} LIKE {string:name_' . $k . '}'; + $clauses[] = '{column_ci:pm.from_name} LIKE {string_ci:name_' . $k . '}'; } if (Db::$db->num_rows($request) == 0) {