From ca6476faf9e5a5db6b82b364fab676f830e64f9c Mon Sep 17 00:00:00 2001 From: Mark Crane Date: Thu, 7 Mar 2013 19:42:40 +0000 Subject: [PATCH] Remove the % wild card for the xml cdr search. This allows the user to specify it to meet there needs. For example show all calls that start with a 1 do the following 1%. If you want to find a call containing a number %208%. --- app/xml_cdr/xml_cdr_inc.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/xml_cdr/xml_cdr_inc.php b/app/xml_cdr/xml_cdr_inc.php index 77d0d69c52..9ad61124f2 100644 --- a/app/xml_cdr/xml_cdr_inc.php +++ b/app/xml_cdr/xml_cdr_inc.php @@ -80,7 +80,7 @@ else { } if (strlen($cdr_id) > 0) { $sql_where .= "and cdr_id like '%$cdr_id%' "; } if (strlen($direction) > 0) { $sql_where .= "and direction = '$direction' "; } - if (strlen($caller_id_name) > 0) { $sql_where .= "and caller_id_name like '%$caller_id_name%' "; } + if (strlen($caller_id_name) > 0) { $sql_where .= "and caller_id_name like '$caller_id_name' "; } if (strlen($caller_id_number) > 0 && strlen($destination_number) > 0) { $sql_where .= "and ("; $sql_where .= "caller_id_number = '$caller_id_number' "; @@ -88,8 +88,8 @@ else { $sql_where .= ") "; } else { - if (strlen($caller_id_number) > 0) { $sql_where .= "and caller_id_number like '%$caller_id_number%' "; } - if (strlen($destination_number) > 0) { $sql_where .= "and destination_number like '%$destination_number%' "; } + if (strlen($caller_id_number) > 0) { $sql_where .= "and caller_id_number like '$caller_id_number' "; } + if (strlen($destination_number) > 0) { $sql_where .= "and destination_number like '$destination_number' "; } } if (strlen($context) > 0) { $sql_where .= "and context like '%$context%' "; } if ($db_type == "sqlite") {