Fix bug with history for search in messages

This commit is contained in:
Dmitriy Simushev 2013-04-11 12:33:49 +00:00
parent 545bb19896
commit d14a778831

View File

@ -58,9 +58,11 @@ if ($query !== false) {
$searchConditions[] = "({chatmessage}.tmessage LIKE :query" . $searchConditions[] = "({chatmessage}.tmessage LIKE :query" .
($searchInSystemMessages?'':" AND ({chatmessage}.ikind = :kind_user OR {chatmessage}.ikind = :kind_agent)") . ($searchInSystemMessages?'':" AND ({chatmessage}.ikind = :kind_user OR {chatmessage}.ikind = :kind_agent)") .
")"; ")";
if (! $searchInSystemMessages) {
$values[':kind_user'] = Thread::KIND_USER; $values[':kind_user'] = Thread::KIND_USER;
$values[':kind_agent'] = Thread::KIND_AGENT; $values[':kind_agent'] = Thread::KIND_AGENT;
} }
}
if ($searchType == 'operator' || $searchType == 'all') { if ($searchType == 'operator' || $searchType == 'all') {
$searchConditions[] = "({chatthread}.agentName LIKE :query)"; $searchConditions[] = "({chatthread}.agentName LIKE :query)";
} }