Skip to content

Commit

Permalink
Fix Db errors on component search
Browse files Browse the repository at this point in the history
  • Loading branch information
tbar0970 committed Feb 24, 2016
1 parent 2c91991 commit ce36186
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions db_objects/service_component.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ function search($keyword, $tagid, $congregationid, $categoryid=NULL)
if (!empty($categoryid)) {
$conds['categoryid'] = (int)$categoryid;
}
return $GLOBALS['system']->getDBObjectData('service_component', $conds, 'AND', 'title');
return $GLOBALS['system']->getDBObjectData('service_component', $conds, 'AND', 'service_component.title');
}

/**
Expand Down Expand Up @@ -173,7 +173,7 @@ function getInstancesQueryComps($params, $logic, $order)
}
if ($keyword) {
$qk = $GLOBALS['db']->quote("%{$keyword}%");
$res['where'] .= ' '.$logic.' (title LIKE '.$qk.' OR alt_title LIKE '.$qk.' OR content_html LIKE '.$qk.')';
$res['where'] .= ' '.$logic.' (service_component.title LIKE '.$qk.' OR alt_title LIKE '.$qk.' OR content_html LIKE '.$qk.')';
}

return $res;
Expand Down

0 comments on commit ce36186

Please sign in to comment.