reset counters on frontend catchup requests

master
Andrew Dolgov 16 years ago
parent 37fb651d38
commit ad0056a8b2

@ -164,6 +164,8 @@
case "catchupAll": case "catchupAll":
db_query($link, "UPDATE ttrss_user_entries SET db_query($link, "UPDATE ttrss_user_entries SET
last_read = NOW(),unread = false WHERE owner_uid = " . $_SESSION["uid"]); last_read = NOW(),unread = false WHERE owner_uid = " . $_SESSION["uid"]);
ccache_zero_all($link, $_SESSION["uid"]);
break; break;
case "collapse": case "collapse":

@ -2243,6 +2243,9 @@
AND owner_uid = ".$_SESSION["uid"]); */ AND owner_uid = ".$_SESSION["uid"]); */
} }
} }
ccache_update($link, $feed, $_SESSION["uid"], $cat_view);
} else { // tag } else { // tag
db_query($link, "BEGIN"); db_query($link, "BEGIN");
@ -5992,7 +5995,15 @@
feed_id = '$feed_id' AND owner_uid = '$owner_uid'"); feed_id = '$feed_id' AND owner_uid = '$owner_uid'");
} }
function ccache_invalidate($link, $feed_id, $owner_uid, $is_cat = false) { function ccache_zero_all($link, $owner_uid) {
db_query($link, "UPDATE ttrss_counters_cache SET
value = 0 WHERE owner_uid = '$owner_uid'");
db_query($link, "UPDATE ttrss_cat_counters_cache SET
value = 0 WHERE owner_uid = '$owner_uid'");
}
/* function ccache_invalidate($link, $feed_id, $owner_uid, $is_cat = false) {
if (!$is_cat) { if (!$is_cat) {
$table = "ttrss_counters_cache"; $table = "ttrss_counters_cache";
@ -6002,7 +6013,7 @@
db_query($link, "DELETE FROM $table db_query($link, "DELETE FROM $table
WHERE feed_id = '$feed_id' AND owner_uid = '$owner_uid'"); WHERE feed_id = '$feed_id' AND owner_uid = '$owner_uid'");
} } */
function ccache_find($link, $feed_id, $owner_uid, $is_cat = false) { function ccache_find($link, $feed_id, $owner_uid, $is_cat = false) {

Loading…
Cancel
Save