mirror of
https://github.com/joomla-extensions/patchtester.git
synced 2025-01-06 00:10:40 +00:00
Merge pull request #119 from photodude/patch-1
Move the is_numeric($search) to it's own condition
This commit is contained in:
commit
c2681fd4d4
@ -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