From 4b4735cb80c059cbbeda0de81a67eacebc2a9e7f Mon Sep 17 00:00:00 2001 From: Klaus Leithoff Date: Wed, 7 Jul 2010 14:12:41 +0000 Subject: [PATCH] allow for like wildcard.val.wildcard in filtersearch for customfields (needed for advanced search, as criteria are now remapped to be filters for customfields) --- etemplate/inc/class.so_sql_cf.inc.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/etemplate/inc/class.so_sql_cf.inc.php b/etemplate/inc/class.so_sql_cf.inc.php index d927118c75..285b0ba149 100644 --- a/etemplate/inc/class.so_sql_cf.inc.php +++ b/etemplate/inc/class.so_sql_cf.inc.php @@ -553,6 +553,14 @@ class so_sql_cf extends so_sql )) ); } + elseif ($this->customfields[$this->get_cf_name($name)]['type'] == 'text') + { + $sql_filter = str_replace($this->extra_value,'extra_filter.'.$this->extra_value, + $this->db->expression($this->extra_table,array( + $this->extra_value.' '.$this->db->capabilities[egw_db::CAPABILITY_CASE_INSENSITIV_LIKE].' '.$this->db->quote($wildcard.$val.$wildcard) + )) + ); + } else { $sql_filter = str_replace($this->extra_value,'extra_filter.'.