summaryrefslogtreecommitdiff
path: root/functions.php
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2009-04-01 18:36:50 +0400
committerAndrew Dolgov <[email protected]>2009-04-01 18:36:50 +0400
commit2e93b64ccaf76c6bb605aad38a34d01a88656c18 (patch)
tree515fae3a99b383afec7b31ff2c662187083b184f /functions.php
parente117ab70006c5d04901b4c21aa7ef951c8f657aa (diff)
ccache: possible workaround against misowned entries
Diffstat (limited to 'functions.php')
-rw-r--r--functions.php9
1 files changed, 9 insertions, 0 deletions
diff --git a/functions.php b/functions.php
index 9371596cc..e9ef17861 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