From d151afd229fbd884ee034a7deca664009ae164a2 Mon Sep 17 00:00:00 2001 From: Aleksander Machniak Date: Thu, 11 May 2017 08:56:42 +0200 Subject: [PATCH] Fix addressbook searching by gender (#5757) --- CHANGELOG | 1 + program/lib/Roundcube/rcube_addressbook.php | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/CHANGELOG b/CHANGELOG index 87b4f6c16..8b29e376f 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -8,6 +8,7 @@ CHANGELOG Roundcube Webmail - Fix bug where comment notation within style tag would cause the whole style to be ignored (#5747) - Fix bug where it wasn't possible to scroll folders list in Edge (#5750) - Fix folders list sorting on Windows - if php-intl is available (#5732) +- Fix addressbook searching by gender (#5757) RELEASE 1.3-rc -------------- diff --git a/program/lib/Roundcube/rcube_addressbook.php b/program/lib/Roundcube/rcube_addressbook.php index e4b523dc7..e670214d5 100644 --- a/program/lib/Roundcube/rcube_addressbook.php +++ b/program/lib/Roundcube/rcube_addressbook.php @@ -685,6 +685,11 @@ abstract class rcube_addressbook && $value->format('Ymd') == $search->format('Ymd')); } + // Gender is a special value, must use strict comparison (#5757) + if ($colname == 'gender') { + $mode = self::SEARCH_STRICT; + } + // composite field, e.g. address foreach ((array)$value as $val) { $val = mb_strtolower($val);