Merge pull request #120 from andrepereiradasilva/patch-1

Resolve issue when searching by pull id "id:xxxxx"
This commit is contained in:
Michael Babker 2016-02-12 10:36:31 -05:00
commit 2ec503f642
1 changed files with 2 additions and 2 deletions

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 ' . $db->quote('%' . (int) $search . '%'));
}
else
{