33
0
mirror of https://github.com/joomla-extensions/patchtester.git synced 2024-12-22 10:58:58 +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); $query->where($db->quoteName('pulls.is_rtc') . ' = ' . $value);
} }
$npm = $this->getState()->get('filter.npm'); $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 if (strlen($npm) === 1) {
$value = $npm === 'no' ? '0' : '1'; $query->where($db->quoteName('pulls.is_npm') . ' = ' . (int) $npm);
$query->where($db->quoteName('pulls.is_npm') . ' = ' . $value);
} }
$draft = $this->getState()->get('filter.draft'); $draft = $this->getState()->get('filter.draft');