X-Git-Url: https://git.wh0rd.org/?a=blobdiff_plain;f=include%2Ffeedbrowser.php;h=aa55048d3314cf54459e6a487ce3bc7d9eb75c51;hb=e52034b4bcce994312ce2af31be0a46a70172691;hp=a5a9f3dca4a767d1fccbcca8cb694b098860ce2f;hpb=f830f853a919c458d06bdc6ce292b8ae73a801f3;p=tt-rss.git diff --git a/include/feedbrowser.php b/include/feedbrowser.php index a5a9f3dc..aa55048d 100644 --- a/include/feedbrowser.php +++ b/include/feedbrowser.php @@ -21,11 +21,11 @@ (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;