31
0
mirror of https://github.com/joomla-extensions/patchtester.git synced 2024-06-26 08:22:34 +00:00

Add a check to allow searching w/o prefix id

This commit is contained in:
photodude 2015-12-16 19:34:28 -07:00
parent 1f2b9389f7
commit bc16e63018

View File

@ -128,7 +128,7 @@ class PullsModel extends \JModelDatabase
if (!empty($search))
{
if (stripos($search, 'id:') === 0)
if (stripos($search, 'id:') === 0 || is_numeric($search))
{
$query->where($db->quoteName('a.id') . ' = ' . (int) substr($search, 3));
}