From 51515a487ed72eabd7a5fbbade31a0a7d50d80b9 Mon Sep 17 00:00:00 2001 From: atm-ph Date: Thu, 7 Feb 2019 17:58:25 +0100 Subject: [PATCH] Fix search unaccent from left menu search box --- htdocs/core/db/pgsql.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/db/pgsql.class.php b/htdocs/core/db/pgsql.class.php index 392e0998d6b..3d365142a0a 100644 --- a/htdocs/core/db/pgsql.class.php +++ b/htdocs/core/db/pgsql.class.php @@ -317,7 +317,7 @@ class DoliDBPgsql extends DoliDB if (!empty($conf->global->PSQL_USE_UNACCENT) && $count_like > 0) { // @see https://docs.postgresql.fr/11/unaccent.html : 'unaccent()' function must be installed before - $line=preg_replace('/\s+(\(?\s*)([a-zA-Z0-9\-\_\.]+) ILIKE /', ' \1unaccent(\2) ILIKE ', $line); + $line=preg_replace('/\s+(\(+\s*)([a-zA-Z0-9\-\_\.]+) ILIKE /', ' \1unaccent(\2) ILIKE ', $line); } $line=str_replace(' LIKE BINARY \'',' LIKE \'',$line);