From 9412ba14e40b88b84ef5c97395802fc0bbe95614 Mon Sep 17 00:00:00 2001 From: photodude Date: Thu, 17 Dec 2015 09:39:55 -0700 Subject: [PATCH] Move the is_numeric($search) to it's own condition --- .../com_patchtester/PatchTester/Model/PullsModel.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/administrator/components/com_patchtester/PatchTester/Model/PullsModel.php b/administrator/components/com_patchtester/PatchTester/Model/PullsModel.php index b03148d..fac0f10 100644 --- a/administrator/components/com_patchtester/PatchTester/Model/PullsModel.php +++ b/administrator/components/com_patchtester/PatchTester/Model/PullsModel.php @@ -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) . '%');