From 314956d440a0a42d0dc4ae7b6c8bcbb7fd80eeb9 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Tue, 11 Aug 2015 19:13:08 +0300 Subject: [PATCH] filter test dialog fixes for filters w/ many rules --- classes/pref/filters.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/classes/pref/filters.php b/classes/pref/filters.php index 2c039e5d..a8434087 100644 --- a/classes/pref/filters.php +++ b/classes/pref/filters.php @@ -80,10 +80,10 @@ class Pref_Filters extends Handler_Protected { if (isset($rule["feed_id"]) && $rule['feed_id'] > 0) { array_push($scope_qparts, "feed_id = " . $rule["feed_id"]); - } - - if (isset($rule["cat_id"])) { + } else if (isset($rule["cat_id"])) { array_push($scope_qparts, "cat_id = " . $rule["cat_id"]); + } else { + array_push($scope_qparts, "true"); } array_push($filter["rules"], $rule); @@ -106,7 +106,7 @@ class Pref_Filters extends Handler_Protected { print "
"; print ""; - $glue = $filter['match_any_rule'] ? " AND " : "OR "; + $glue = $filter['match_any_rule'] ? " OR " : " AND "; $scope_qpart = join($glue, $scope_qparts); if (!$scope_qpart) $scope_qpart = "true"; -- 2.39.5