]> git.wh0rd.org Git - tt-rss.git/commitdiff
block ccache for special cat_ids
authorAndrew Dolgov <fox@bah.spb.su>
Fri, 16 Jan 2009 15:45:16 +0000 (16:45 +0100)
committerAndrew Dolgov <fox@bah.spb.su>
Fri, 16 Jan 2009 15:45:16 +0000 (16:45 +0100)
functions.php

index 239e74e6c2c7f5bed31d2c2347167603f11321d9..e49dd9d21e3215169462b2df771a487663c63605 100644 (file)
 
                print "<counter type=\"category\" id=\"-2\" counter=\"$ctr\"/>";
 
+               $ctr = getCategoryUnread($link, -3);
+
+               print "<counter type=\"category\" id=\"-3\" counter=\"$ctr\"/>";
+
                $age_qpart = getMaxAgeSubquery();
 
 /*             $result = db_query($link, "SELECT cat_id,SUM((SELECT COUNT(int_id) 
        function printCategoryHeader($link, $cat_id, $hidden = false, $can_browse = true) {
 
                        $tmp_category = getCategoryTitle($link, $cat_id);
-                       $cat_unread = ccache_find($link, $cat_id, $_SESSION["uid"], true);
+
+                       if ($cat_id > 0) {
+                               $cat_unread = ccache_find($link, $cat_id, $_SESSION["uid"], true);
+                       } else {
+                               $cat_unread = getCategoryUnread($link, $cat_id);
+                       }
 
                        if ($hidden) {
                                $holder_style = "display:none;";