Skip to content

Commit

Permalink
cs
Browse files Browse the repository at this point in the history
  • Loading branch information
alikon committed Jun 13, 2019
1 parent f37e606 commit 99e264c
Showing 1 changed file with 12 additions and 9 deletions.
21 changes: 12 additions & 9 deletions administrator/components/com_content/Model/ArticlesModel.php
Original file line number Diff line number Diff line change
Expand Up @@ -448,25 +448,28 @@ protected function getListQuery()
elseif (stripos($search, 'author:') === 0)
{
$search = '%' . substr($search, 7) . '%';
$query->where('(' . $db->quoteName('ua.name') . ' LIKE :name' .
' OR ' . $db->quoteName('ua.username') . ' LIKE :uname'. ')');
$query->bind(':name', $search)
$query->where($db->quoteName('ua.name') . ' LIKE :name')
->orWhere($db->quoteName('ua.username') . ' LIKE :uname')
->bind(':name', $search)
->bind(':uname', $search);
}
elseif (stripos($search, 'content:') === 0)
{
$search = '%' . substr($search, 8) . '%';
$query->where('(a.introtext LIKE ' . $search . ' OR a.fulltext LIKE ' . $search . ')');
$query->where($db->quoteName('a.introtext') . ' LIKE :intro')
->orWhere($db->quoteName('a.fulltext') . ' LIKE :full')
->bind(':intro', $search)
->bind(':full', $search);
}
else
{
$search = '%' . trim($search) . '%';
$query->where('(' . $db->quoteName('a.title') . ' LIKE :title' .
' OR ' . $db->quoteName('a.alias') . ' LIKE :alias' .
' OR '. $db->quoteName('a.note') . ' LIKE :note' . ')');
$query->bind(':title', $search)
$query->where($db->quoteName('a.title') . ' LIKE :title')
->orWhere($db->quoteName('a.alias') . ' LIKE :alias')
->orWhere($db->quoteName('a.note') . ' LIKE :note')
->bind(':title', $search)
->bind(':alias', $search)
->bind(':note', $search);
->bind(':note', $search);
}
}

Expand Down

0 comments on commit 99e264c

Please sign in to comment.