From: Andrew Dolgov Date: Mon, 13 Jul 2015 09:53:13 +0000 (+0300) Subject: minor filter test dialog fixes X-Git-Tag: 16.3~230 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=9638ec51b67f5a49b9ed2f906d4b86d96e66e52f;p=tt-rss.git minor filter test dialog fixes --- 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,