From 6b218731afc1b317cdeb97a72d5d157840429182 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Mon, 3 Sep 2012 15:18:27 +0400 Subject: [PATCH] filter_to_sql: fix for all feeds --- include/functions.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/functions.php b/include/functions.php index dd97522c..d1855e99 100644 --- a/include/functions.php +++ b/include/functions.php @@ -5101,8 +5101,8 @@ break; } - if (isset($rule["feed_id"])) { - $qpart .= " AND feed_id " . ($rule["feed_id"] ? '= ' . $rule["feed_id"] : 'IS NULL'); + if (isset($rule["feed_id"]) && $rule["feed_id"] > 0) { + $qpart .= " AND feed_id = " . db_escape_string($rule["feed_id"]); } if (isset($rule["cat_id"])) { -- 2.39.5