implement feedbrowser using linked feeds; set proper fetch timeout
This commit is contained in:
parent
ae5f7bb11a
commit
414d0d1f46
2 changed files with 13 additions and 3 deletions
|
@ -7371,7 +7371,7 @@
|
||||||
$instance_qpart = "";
|
$instance_qpart = "";
|
||||||
|
|
||||||
if (DB_TYPE == "pgsql") {
|
if (DB_TYPE == "pgsql") {
|
||||||
$date_qpart = "last_connected < NOW() - INTERVAL '1 second'";
|
$date_qpart = "last_connected < NOW() - INTERVAL '6 hours'";
|
||||||
} else {
|
} else {
|
||||||
$date_qpart = "last_connected < DATE_SUB(NOW(), INTERVAL 6 HOUR";
|
$date_qpart = "last_connected < DATE_SUB(NOW(), INTERVAL 6 HOUR";
|
||||||
}
|
}
|
||||||
|
|
|
@ -1539,11 +1539,21 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($mode == 1) {
|
if ($mode == 1) {
|
||||||
$result = db_query($link, "SELECT feed_url, subscribers FROM
|
/* $result = db_query($link, "SELECT feed_url, subscribers FROM
|
||||||
ttrss_feedbrowser_cache WHERE (SELECT COUNT(id) = 0 FROM ttrss_feeds AS tf
|
ttrss_feedbrowser_cache WHERE (SELECT COUNT(id) = 0 FROM ttrss_feeds AS tf
|
||||||
WHERE tf.feed_url = ttrss_feedbrowser_cache.feed_url
|
WHERE tf.feed_url = ttrss_feedbrowser_cache.feed_url
|
||||||
AND owner_uid = '$owner_uid') $search_qpart
|
AND owner_uid = '$owner_uid') $search_qpart
|
||||||
ORDER BY subscribers DESC LIMIT $limit");
|
ORDER BY subscribers DESC LIMIT $limit"); */
|
||||||
|
|
||||||
|
$result = db_query($link, "SELECT feed_url, title, SUM(subscribers) AS subscribers FROM
|
||||||
|
(SELECT feed_url, title, subscribers FROM ttrss_feedbrowser_cache UNION ALL
|
||||||
|
SELECT feed_url, title, subscribers FROM ttrss_linked_feeds) AS qqq
|
||||||
|
WHERE
|
||||||
|
(SELECT COUNT(id) = 0 FROM ttrss_feeds AS tf
|
||||||
|
WHERE tf.feed_url = qqq.feed_url
|
||||||
|
AND owner_uid = '$owner_uid') $search_qpart
|
||||||
|
GROUP BY feed_url, title ORDER BY subscribers DESC LIMIT $limit");
|
||||||
|
|
||||||
} else if ($mode == 2) {
|
} else if ($mode == 2) {
|
||||||
$result = db_query($link, "SELECT *,
|
$result = db_query($link, "SELECT *,
|
||||||
(SELECT COUNT(*) FROM ttrss_user_entries WHERE
|
(SELECT COUNT(*) FROM ttrss_user_entries WHERE
|
||||||
|
|
Loading…
Reference in a new issue