summaryrefslogtreecommitdiff
path: root/functions.php
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2009-01-16 16:45:16 +0100
committerAndrew Dolgov <[email protected]>2009-01-16 16:45:16 +0100
commitcc914918fa8827aa54a9071349c9ebaa7ecde94c (patch)
treeafcd45a09e9c6925820e7e786255ac0ce38e299d /functions.php
parentbd090ab42e4856fd7839ae9f6a07e8c4a23c8c81 (diff)
block ccache for special cat_ids
Diffstat (limited to 'functions.php')
-rw-r--r--functions.php11
1 files changed, 10 insertions, 1 deletions
diff --git a/functions.php b/functions.php
index 239e74e6c..e49dd9d21 100644
--- a/functions.php
+++ b/functions.php
@@ -2328,6 +2328,10 @@
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)
@@ -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;";