]> git.wh0rd.org Git - tt-rss.git/commitdiff
filter_to_sql: fix for all feeds
authorAndrew Dolgov <fox@madoka.volgo-balt.ru>
Mon, 3 Sep 2012 11:18:27 +0000 (15:18 +0400)
committerAndrew Dolgov <fox@madoka.volgo-balt.ru>
Mon, 3 Sep 2012 11:18:27 +0000 (15:18 +0400)
include/functions.php

index dd97522c4493b0f9b9a871e9e187339f94ae75eb..d1855e993bea671c0b171609d6acf19bace59669 100644 (file)
                                                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"])) {