From 0737b95a56476b79427b613b50ec4979410244bc Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Fri, 16 Jan 2009 16:02:47 +0100 Subject: [PATCH] support for ccache updates in catchupArticlesById() --- backend.php | 4 +++- functions.php | 9 +++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/backend.php b/backend.php index 12596851..71a95225 100644 --- a/backend.php +++ b/backend.php @@ -270,6 +270,8 @@ $csync = $_GET["csync"]; $order_by = db_escape_string($_GET["order_by"]); + ccache_update($link, $feed, $_SESSION["uid"]); + set_pref($link, "_DEFAULT_VIEW_MODE", $view_mode); set_pref($link, "_DEFAULT_VIEW_LIMIT", $limit); set_pref($link, "_DEFAULT_VIEW_ORDER_BY", $order_by); @@ -322,7 +324,7 @@ print ""; print ""; - $headlines_unread = getFeedUnread($link, $returned_feed); + $headlines_unread = ccache_find($link, $returned_feed, $_SESSION["uid"]); print ""; printf("", $disable_cache); diff --git a/functions.php b/functions.php index e8466599..50f5f723 100644 --- a/functions.php +++ b/functions.php @@ -3980,6 +3980,15 @@ unread = NOT unread,last_read = NOW() WHERE ($ids_qpart) AND owner_uid = $owner_uid"); } + + /* update ccache */ + + $result = db_query($link, "SELECT DISTINCT feed_id FROM ttrss_user_entries + WHERE ($ids_qpart) AND owner_uid = $owner_uid"); + + while ($line = db_fetch_assoc($result)) { + ccache_update($link, $line["feed_id"], $owner_uid); + } } function catchupArticleById($link, $id, $cmode) { -- 2.39.5