From 9638ec51b67f5a49b9ed2f906d4b86d96e66e52f Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Mon, 13 Jul 2015 12:53:13 +0300 Subject: [PATCH] minor filter test dialog fixes --- classes/pref/filters.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/classes/pref/filters.php b/classes/pref/filters.php index de86d8d6..2c039e5d 100644 --- a/classes/pref/filters.php +++ b/classes/pref/filters.php @@ -78,12 +78,12 @@ class Pref_Filters extends Handler_Protected { unset($rule["feed_id"]); } - if (isset($rule["feed_id"])) { + if (isset($rule["feed_id"]) && $rule['feed_id'] > 0) { array_push($scope_qparts, "feed_id = " . $rule["feed_id"]); } if (isset($rule["cat_id"])) { - array_push($scope_qparts, "cat_id = " . $rule["feed_id"]); + array_push($scope_qparts, "cat_id = " . $rule["cat_id"]); } array_push($filter["rules"], $rule); @@ -109,6 +109,8 @@ class Pref_Filters extends Handler_Protected { $glue = $filter['match_any_rule'] ? " AND " : "OR "; $scope_qpart = join($glue, $scope_qparts); + if (!$scope_qpart) $scope_qpart = "true"; + while ($found < $limit && $offset < $limit * 10 && time() - $started < ini_get("max_execution_time") * 0.7) { $result = db_query("SELECT ttrss_entries.id,