Skip to content

Commit

Permalink
Restrict search result messages by putting it in parentheses (#26065)
Browse files Browse the repository at this point in the history
  • Loading branch information
ma-at authored and HLeithner committed Sep 28, 2019
1 parent 3601da2 commit 163234b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion administrator/components/com_messages/models/messages.php
Expand Up @@ -137,7 +137,7 @@ protected function getListQuery()
if (!empty($search))
{
$search = $db->quote('%' . str_replace(' ', '%', $db->escape(trim($search), true) . '%'));
$query->where('a.subject LIKE ' . $search . ' OR a.message LIKE ' . $search);
$query->where('(a.subject LIKE ' . $search . ' OR a.message LIKE ' . $search . ')');
}

// Add the list ordering clause.
Expand Down

0 comments on commit 163234b

Please sign in to comment.