33
0
mirror of https://github.com/joomla-extensions/patchtester.git synced 2024-12-22 02:49:01 +00:00

Fixed NPM filter

Signed-off-by: Roland Dalmulder <contact@rolandd.com>
This commit is contained in:
Roland Dalmulder 2023-08-25 20:34:03 +02:00
parent bafb673cbf
commit d1419dc893
No known key found for this signature in database
GPG Key ID: 6D30CD38749A5B9E

View File

@ -256,11 +256,10 @@ class PullsModel extends ListModel
$query->where($db->quoteName('pulls.is_rtc') . ' = ' . $value);
}
$npm = $this->getState()->get('filter.npm');
if (!empty($npm)) {
// Not applied patches have a NULL value, so build our value part of the query based on this
$value = $npm === 'no' ? '0' : '1';
$query->where($db->quoteName('pulls.is_npm') . ' = ' . $value);
$npm = $this->getState()->get('filter.npm', '');
if (strlen($npm) === 1) {
$query->where($db->quoteName('pulls.is_npm') . ' = ' . (int) $npm);
}
$draft = $this->getState()->get('filter.draft');