Skip to content
Snippets Groups Projects
Commit ad31f1f1 authored by Jared Hancock's avatar Jared Hancock
Browse files

search: Fix ticket number search on client portal

parent f3238767
No related branches found
No related tags found
No related merge requests found
......@@ -70,10 +70,10 @@ if($status && isset($states[$status])){
$search=($_REQUEST['a']=='search' && $_REQUEST['q']);
if($search) {
$qs += array('a' => $_REQUEST['a'], 'q' => $_REQUEST['q']);
$queryterm=db_real_escape($_REQUEST['q'],false); //escape the term ONLY...no quotes.
if(is_numeric($_REQUEST['q'])) {
$qwhere.=" AND ticket.`number` LIKE '$queryterm%'";
} else {//Deep search!
$queryterm=db_real_escape($_REQUEST['q'],false); //escape the term ONLY...no quotes.
$qwhere.=' AND ( '
." cdata.subject LIKE '%$queryterm%'"
." OR thread.body LIKE '%$queryterm%'"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment