From 4d795b6f54f7eda8178441502835214ab510d36c Mon Sep 17 00:00:00 2001 From: "deb.monish" Date: Tue, 28 Jun 2016 16:43:20 +0530 Subject: [PATCH] CRM-19004: Event/BAO/Query.php role search fails --- CRM/Event/BAO/Query.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CRM/Event/BAO/Query.php b/CRM/Event/BAO/Query.php index 1b929ae29e..16d9ae17bb 100644 --- a/CRM/Event/BAO/Query.php +++ b/CRM/Event/BAO/Query.php @@ -414,7 +414,7 @@ class CRM_Event_BAO_Query { } if (!strstr($op, 'NULL') && !strstr($op, 'EMPTY') && !strstr($op, 'LIKE')) { $regexOp = (strstr($op, '!') || strstr($op, 'NOT')) ? 'NOT REGEXP' : 'REGEXP'; - $regexp = "[[:cntrl:]]*" . implode('[[:>:]]*|[[:<:]]*', (array) $value) . "[[:cntrl:]]*"; + $regexp = "([[:cntrl:]]|^)" . implode('([[:cntrl:]]|$)|([[:cntrl:]]|^)', (array) $value) . "([[:cntrl:]]|$)"; $query->_where[$grouping][] = CRM_Contact_BAO_Query::buildClause("civicrm_participant.$name", $regexOp, $regexp, 'String'); } else { -- 2.25.1