From: Andrew Dolgov Date: Mon, 3 Sep 2012 11:18:27 +0000 (+0400) Subject: filter_to_sql: fix for all feeds X-Git-Tag: 1.6.0~78 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=6b218731afc1b317cdeb97a72d5d157840429182;p=tt-rss.git filter_to_sql: fix for all feeds --- 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"])) {