filter_to_sql: fix for all feeds

This commit is contained in:
Andrew Dolgov 2012-09-03 15:18:27 +04:00
parent 4e02f58294
commit 6b218731af
1 changed files with 2 additions and 2 deletions

View File

@ -5101,8 +5101,8 @@
break; break;
} }
if (isset($rule["feed_id"])) { if (isset($rule["feed_id"]) && $rule["feed_id"] > 0) {
$qpart .= " AND feed_id " . ($rule["feed_id"] ? '= ' . $rule["feed_id"] : 'IS NULL'); $qpart .= " AND feed_id = " . db_escape_string($rule["feed_id"]);
} }
if (isset($rule["cat_id"])) { if (isset($rule["cat_id"])) {