31
0
mirror of https://github.com/joomla-extensions/patchtester.git synced 2024-06-14 02:52:19 +00:00

Resolve issue when searching by id "id:xxxxx"

This commit is contained in:
andrepereiradasilva 2016-02-12 10:20:30 +00:00
parent f8b5c96483
commit 0557bf1bf8

View File

@ -130,11 +130,11 @@ class PullsModel extends \JModelDatabase
{
if (stripos($search, 'id:') === 0)
{
$query->where($db->quoteName('a.id') . ' = ' . (int) substr($search, 3));
$query->where($db->quoteName('a.pull_id') . ' = ' . (int) substr($search, 3));
}
elseif (is_numeric($search))
{
$query->where('(' . $db->quoteName('a.id') . ' LIKE % ' . (int) $search . '%)');
$query->where('(' . $db->quoteName('a.pull_id') . ' LIKE % ' . (int) $search . '%)');
}
else
{