mirror of
https://github.com/joomla-extensions/patchtester.git
synced 2025-01-08 16:54:06 +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 (!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));
|
$query->where($db->quoteName('a.id') . ' = ' . (int) substr($search, 3));
|
||||||
}
|
}
|
||||||
|
elseif (is_numeric($search))
|
||||||
|
{
|
||||||
|
$query->where('(' . $db->quoteName('a.id') . ' LIKE "% ' . (int) $search . '%")');
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$search = $db->quote('%' . $db->escape($search, true) . '%');
|
$search = $db->quote('%' . $db->escape($search, true) . '%');
|
||||||
|
Loading…
Reference in New Issue
Block a user