diff options
author | Andrew Dolgov <[email protected]> | 2009-04-01 18:36:50 +0400 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2009-04-01 18:36:50 +0400 |
commit | 2e93b64ccaf76c6bb605aad38a34d01a88656c18 (patch) | |
tree | 515fae3a99b383afec7b31ff2c662187083b184f /functions.php | |
parent | e117ab70006c5d04901b4c21aa7ef951c8f657aa (diff) |
ccache: possible workaround against misowned entries
Diffstat (limited to 'functions.php')
-rw-r--r-- | functions.php | 9 |
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 |