From 2e93b64ccaf76c6bb605aad38a34d01a88656c18 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Wed, 1 Apr 2009 18:36:50 +0400 Subject: [PATCH] ccache: possible workaround against misowned entries --- functions.php | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/functions.php b/functions.php index 9371596c..e9ef1786 100644 --- a/functions.php +++ b/functions.php @@ -5801,6 +5801,9 @@ if (!$is_cat) { $table = "ttrss_counters_cache"; + $tmp_result = db_query($link, "SELECT owner_uid FROM ttrss_feeds + WHERE id = '$feed_id'"); + $owner_uid = db_fetch_result($tmp_result, 0, "owner_uid"); } else { $table = "ttrss_cat_counters_cache"; } @@ -5832,6 +5835,12 @@ if (!is_numeric($feed_id)) return; + if (!$is_cat) { + $tmp_result = db_query($link, "SELECT owner_uid FROM ttrss_feeds + WHERE id = '$feed_id'"); + $owner_uid = db_fetch_result($tmp_result, 0, "owner_uid"); + } + $prev_unread = ccache_find($link, $feed_id, $owner_uid, $is_cat, true); /* When updating a label, all we need to do is recalculate feed counters -- 2.39.5