Skip to content

Commit

Permalink
Perform canned messages search also in title
Browse files Browse the repository at this point in the history
  • Loading branch information
remdex committed Mar 30, 2020
1 parent c6a91c1 commit c963e57
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lhc_web/lib/models/lhchat/erlhcoreclassmodelcannedmsg.php
Expand Up @@ -236,7 +236,10 @@ public static function getCannedMessages($department_id, $user_id, $paramsFilter
$filter[] = $q->expr->lOr($q->expr->eq('department_id', $q->bindValue($department_id)), $q->expr->lAnd($q->expr->eq('department_id', $q->bindValue(0)), $q->expr->eq('user_id', $q->bindValue(0))), $q->expr->eq('user_id', $q->bindValue($user_id)));

if (isset($paramsFilter['q']) && $paramsFilter['q'] != '') {
$filter[] = $q->expr->like('msg', $q->bindValue('%' . $paramsFilter['q'] . '%'));
$filter[] = $q->expr->lOr(
$q->expr->like('msg', $q->bindValue('%' . $paramsFilter['q'] . '%')),
$q->expr->like('title', $q->bindValue('%' . $paramsFilter['q'] . '%'))
);
}

if (isset($paramsFilter['id']) && !empty($paramsFilter['id'])) {
Expand Down

0 comments on commit c963e57

Please sign in to comment.