mirror of
https://github.com/joomla-extensions/patchtester.git
synced 2024-12-22 19:09:00 +00:00
Move the is_numeric($search) to it's own condition
This commit is contained in:
parent
30f950bab1
commit
9412ba14e4
@ -128,10 +128,14 @@ class PullsModel extends \JModelDatabase
|
||||
|
||||
if (!empty($search))
|
||||
{
|
||||
if (stripos($search, 'id:') === 0 || is_numeric($search))
|
||||
if (stripos($search, 'id:') === 0)
|
||||
{
|
||||
$query->where($db->quoteName('a.id') . ' = ' . (int) substr($search, 3));
|
||||
}
|
||||
elseif (is_numeric($search))
|
||||
{
|
||||
$query->where('(' . $db->quoteName('a.id') . ' LIKE ' . (int) $search. ')');
|
||||
}
|
||||
else
|
||||
{
|
||||
$search = $db->quote('%' . $db->escape($search, true) . '%');
|
||||
|
Loading…
Reference in New Issue
Block a user