projects
/
civicrm-core.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
badd52a
)
CRM-16575: Fixing custom field search issue for reports
author
omar abu hussein
<opetmar91@gmail.com>
Wed, 23 Nov 2016 20:21:39 +0000
(22:21 +0200)
committer
omar abu hussein
<opetmar91@gmail.com>
Wed, 23 Nov 2016 20:21:39 +0000
(22:21 +0200)
CRM/Report/Form.php
patch
|
blob
|
blame
|
history
diff --git
a/CRM/Report/Form.php
b/CRM/Report/Form.php
index 8a54de487b003de6ad08675f52df59412b94e63c..04da132412342cba752b4c73bdcff56e0014859b 100644
(file)
--- a/
CRM/Report/Form.php
+++ b/
CRM/Report/Form.php
@@
-1742,7
+1742,7
@@
class CRM_Report_Form extends CRM_Core_Form {
if ($value !== NULL && count($value) > 0) {
$value = CRM_Utils_Type::escapeAll($value, $type);
$operator = $op == 'mnot' ? 'NOT' : '';
- $regexp = "
[[:cntrl:]]*" . implode('[[:>:]]*|[[:<:]]*', (array) $value) . "[[:cntrl:]]*
";
+ $regexp = "
([[:cntrl:]]|^)" . implode('([[:cntrl:]]|$)|([[:cntrl:]]|^)', (array) $value) . "([[:cntrl:]]|$)
";
$clause = "{$field['dbAlias']} {$operator} REGEXP '{$regexp}'";
}
break;