ccache: possible workaround against misowned entries
This commit is contained in:
parent
e117ab7000
commit
2e93b64cca
1 changed files with 9 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue