From 8acc449c6bb2c0e185a6a82a6e29c06c0b8185e0 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Fri, 5 Nov 2010 16:38:55 +0300 Subject: [PATCH] change counter.cat and counter.tag to counter.kind --- functions.js | 4 ++-- functions.php | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/functions.js b/functions.js index 01c3c050..f6b7ec33 100644 --- a/functions.js +++ b/functions.js @@ -388,7 +388,7 @@ function parse_counters(reply, scheduled_call) { for (var l = 0; l < elems.length; l++) { var id = elems[l].id - var is_cat = elems[l].cat; + var kind = elems[l].kind; var ctr = parseInt(elems[l].counter) var error = elems[l].error; var has_img = elems[l].has_img; @@ -412,7 +412,7 @@ function parse_counters(reply, scheduled_call) { continue; } - if (is_cat) { + if (kind && kind == "cat") { var catctr = $("FCATCTR-" + id); if (catctr) { catctr.innerHTML = "(" + ctr + ")"; diff --git a/functions.php b/functions.php index e39a04ca..be393764 100644 --- a/functions.php +++ b/functions.php @@ -2476,7 +2476,7 @@ /* Labels category */ - $cv = array("id" => -2, "cat" => true, + $cv = array("id" => -2, "kind" => "cat", "counter" => getCategoryUnread($link, -2)); array_push($ret_arr, $cv); @@ -2491,7 +2491,7 @@ while ($line = db_fetch_assoc($result)) { $line["cat_id"] = (int) $line["cat_id"]; - $cv = array("id" => $line["cat_id"], "cat" => true, + $cv = array("id" => $line["cat_id"], "kind" => "cat", "counter" => $line["unread"]); array_push($ret_arr, $cv); @@ -2792,7 +2792,7 @@ $tag = htmlspecialchars($tag); $cv = array("id" => $tag, - "tag" => true, + "kind" => "tag", "counter" => $unread); array_push($ret_arr, $cv); -- 2.39.5