Skip to content

Commit

Permalink
Revert "remove prefix, always search for intro and full text"
Browse files Browse the repository at this point in the history
This reverts commit af4979f.
  • Loading branch information
smehrbrodt committed Apr 5, 2018
1 parent af4979f commit db4c7ef
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions administrator/components/com_content/models/articles.php
Expand Up @@ -330,11 +330,15 @@ protected function getListQuery()
$search = $db->quote('%' . $db->escape(substr($search, 7), true) . '%');
$query->where('(ua.name LIKE ' . $search . ' OR ua.username LIKE ' . $search . ')');
}
elseif (stripos($search, 'content:') === 0)
{
$search = $db->quote('%' . $db->escape(substr($search, 8), true) . '%');
$query->where('(a.introtext LIKE ' . $search . ' OR a.fulltext LIKE ' . $search . ')');
}
else
{
$search = $db->quote('%' . str_replace(' ', '%', $db->escape(trim($search), true) . '%'));
$query->where('(a.title LIKE ' . $search . ' OR a.alias LIKE ' . $search
. 'OR a.introtext LIKE ' . $search . ' OR a.fulltext LIKE ' . $search . ')');
$query->where('(a.title LIKE ' . $search . ' OR a.alias LIKE ' . $search . ')');
}
}

Expand Down

0 comments on commit db4c7ef

Please sign in to comment.