]> git.wh0rd.org Git - tt-rss.git/commitdiff
add fallback for headlines-unread element when ccache has no data
authorAndrew Dolgov <fox@bah.spb.su>
Sat, 17 Jan 2009 16:21:03 +0000 (17:21 +0100)
committerAndrew Dolgov <fox@bah.spb.su>
Sat, 17 Jan 2009 16:21:03 +0000 (17:21 +0100)
backend.php

index 67990a2a9c7f0d22adfe3d2986ffc3d74ec58450..1a76c4f6bd47c07d929eaa134fbee5532f96d81e 100644 (file)
                        print "<vgroup-last-feed value=\"$vgroup_last_feed\"/>";
 
                        $headlines_unread = ccache_find($link, $returned_feed, $_SESSION["uid"],
-                                       $cat_view);
+                                       $cat_view, true);
+
+                       if ($headlines_unread == -1) {
+                               $headlines_unread = getFeedUnread($link, $returned_feed, $cat_view);
+
+                       }
 
                        print "<headlines-unread value=\"$headlines_unread\"/>";
                        printf("<disable-cache value=\"%d\"/>", $disable_cache);