summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2009-01-17 17:59:19 +0100
committerAndrew Dolgov <[email protected]>2009-01-17 17:59:19 +0100
commit43ead405d432847e039108bbd5d8db46f75fefb8 (patch)
treea2b92e337bcda53f3d4114ede3065b3aad77fb54
parent696a6850db4f86a37e931ade575c9103fd36b27e (diff)
ccache_update: properly call ccache_update_all() when dealing with a label
-rw-r--r--functions.php10
1 files changed, 6 insertions, 4 deletions
diff --git a/functions.php b/functions.php
index 69085bab1..36a3900e7 100644
--- a/functions.php
+++ b/functions.php
@@ -5981,14 +5981,16 @@
function ccache_update($link, $feed_id, $owner_uid, $is_cat = false,
$update_pcat = true) {
- /* Labels are no currently supported */
+ $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
+ * because labels are not cached */
if ($feed_id < 0) {
- return -1;
+ ccache_update_all($link, $owner_uid);
+ return;
}
- $prev_unread = ccache_find($link, $feed_id, $owner_uid, $is_cat, true);
-
if (!$is_cat) {
$table = "ttrss_counters_cache";
} else {