mirror of
https://github.com/joomla-extensions/patchtester.git
synced 2025-01-03 15:17:22 +00:00
Fix backend filter using 'id:##' syntax (Fix #107)
This commit is contained in:
parent
d73715d9ac
commit
76de1805ff
@ -128,12 +128,15 @@ class PullsModel extends \JModelDatabase
|
||||
|
||||
if (!empty($search))
|
||||
{
|
||||
$searchid = $db->quote($db->escape($search, true));
|
||||
if (stripos($search, 'id:') === 0)
|
||||
{
|
||||
$query->where($db->quoteName('a.id') . ' = ' . (int) substr($search, 3));
|
||||
}
|
||||
else
|
||||
{
|
||||
$search = $db->quote('%' . $db->escape($search, true) . '%');
|
||||
$query->where(
|
||||
'(' . $db->quoteName('a.title') . ' LIKE ' . $search . ') OR ' .
|
||||
'(' . $db->quoteName('a.pull_id') . ' = ' . $searchid . ') '
|
||||
);
|
||||
$query->where('(' . $db->quoteName('a.title') . ' LIKE ' . $search . ')');
|
||||
}
|
||||
}
|
||||
|
||||
// Filter for applied patches
|
||||
|
Loading…
Reference in New Issue
Block a user