]> git.wh0rd.org Git - tt-rss.git/commitdiff
ccache_update: properly call ccache_update_all() when dealing with a label
authorAndrew Dolgov <fox@bah.spb.su>
Sat, 17 Jan 2009 16:59:19 +0000 (17:59 +0100)
committerAndrew Dolgov <fox@bah.spb.su>
Sat, 17 Jan 2009 16:59:19 +0000 (17:59 +0100)
functions.php

index 69085bab16d78b9191fe3eba99980c7b4d128202..36a3900e70d106eca2eabdc146bba9dfccb1f8c8 100644 (file)
        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 {