]> git.wh0rd.org - tt-rss.git/blobdiff - include/feedbrowser.php
feedbrowser hack
[tt-rss.git] / include / feedbrowser.php
index a5a9f3dca4a767d1fccbcca8cb694b098860ce2f..aa55048d3314cf54459e6a487ce3bc7d9eb75c51 100644 (file)
                                                (SELECT feed_url, site_url, title, subscribers FROM ttrss_feedbrowser_cache UNION ALL
                                                        SELECT feed_url, site_url, title, subscribers FROM ttrss_linked_feeds) AS qqq
                                                WHERE
-                                                       (SELECT COUNT(id) = 0 FROM ttrss_feeds AS tf
+                                                       (SELECT COUNT(id) != 0 FROM ttrss_feeds AS tf
                                                                WHERE tf.feed_url = qqq.feed_url
-                                                                       AND owner_uid = ?) $search_qpart
-                                               GROUP BY feed_url, site_url, title ORDER BY subscribers DESC LIMIT ?");
-                       $sth->execute([$_SESSION['uid'], $limit]);
+                                                                       ) $search_qpart
+                                               GROUP BY feed_url, site_url, title ORDER BY subscribers DESC LIMIT " . (int)$limit);
+                       $sth->execute([$_SESSION['uid']]);
 
                } else if ($mode == 2) {
                        $sth = $pdo->prepare("SELECT *,
@@ -38,9 +38,9 @@
                                                        WHERE ttrss_feeds.feed_url = ttrss_archived_feeds.feed_url AND
                                                                owner_uid = :uid) = 0   AND
                                                owner_uid = :uid $search_qpart
-                                               ORDER BY id DESC LIMIT :limit");
+                                               ORDER BY id DESC LIMIT " . (int)$limit);
 
-                       $sth->execute([":uid" => $_SESSION['uid'], ":limit" => $limit]);
+                       $sth->execute([":uid" => $_SESSION['uid']]);
                }
 
                $feedctr = 0;