From: Andrew Dolgov Date: Fri, 16 Jan 2009 15:45:16 +0000 (+0100) Subject: block ccache for special cat_ids X-Git-Tag: 1.3.0~144 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=cc914918fa8827aa54a9071349c9ebaa7ecde94c;p=tt-rss.git block ccache for special cat_ids --- diff --git a/functions.php b/functions.php index 239e74e6..e49dd9d2 100644 --- a/functions.php +++ b/functions.php @@ -2328,6 +2328,10 @@ print ""; + $ctr = getCategoryUnread($link, -3); + + print ""; + $age_qpart = getMaxAgeSubquery(); /* $result = db_query($link, "SELECT cat_id,SUM((SELECT COUNT(int_id) @@ -4210,7 +4214,12 @@ 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;";