change counter.cat and counter.tag to counter.kind
This commit is contained in:
parent
2abc7af064
commit
8acc449c6b
|
@ -388,7 +388,7 @@ function parse_counters(reply, scheduled_call) {
|
||||||
for (var l = 0; l < elems.length; l++) {
|
for (var l = 0; l < elems.length; l++) {
|
||||||
|
|
||||||
var id = elems[l].id
|
var id = elems[l].id
|
||||||
var is_cat = elems[l].cat;
|
var kind = elems[l].kind;
|
||||||
var ctr = parseInt(elems[l].counter)
|
var ctr = parseInt(elems[l].counter)
|
||||||
var error = elems[l].error;
|
var error = elems[l].error;
|
||||||
var has_img = elems[l].has_img;
|
var has_img = elems[l].has_img;
|
||||||
|
@ -412,7 +412,7 @@ function parse_counters(reply, scheduled_call) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (is_cat) {
|
if (kind && kind == "cat") {
|
||||||
var catctr = $("FCATCTR-" + id);
|
var catctr = $("FCATCTR-" + id);
|
||||||
if (catctr) {
|
if (catctr) {
|
||||||
catctr.innerHTML = "(" + ctr + ")";
|
catctr.innerHTML = "(" + ctr + ")";
|
||||||
|
|
|
@ -2476,7 +2476,7 @@
|
||||||
|
|
||||||
/* Labels category */
|
/* Labels category */
|
||||||
|
|
||||||
$cv = array("id" => -2, "cat" => true,
|
$cv = array("id" => -2, "kind" => "cat",
|
||||||
"counter" => getCategoryUnread($link, -2));
|
"counter" => getCategoryUnread($link, -2));
|
||||||
|
|
||||||
array_push($ret_arr, $cv);
|
array_push($ret_arr, $cv);
|
||||||
|
@ -2491,7 +2491,7 @@
|
||||||
while ($line = db_fetch_assoc($result)) {
|
while ($line = db_fetch_assoc($result)) {
|
||||||
$line["cat_id"] = (int) $line["cat_id"];
|
$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"]);
|
"counter" => $line["unread"]);
|
||||||
|
|
||||||
array_push($ret_arr, $cv);
|
array_push($ret_arr, $cv);
|
||||||
|
@ -2792,7 +2792,7 @@
|
||||||
$tag = htmlspecialchars($tag);
|
$tag = htmlspecialchars($tag);
|
||||||
|
|
||||||
$cv = array("id" => $tag,
|
$cv = array("id" => $tag,
|
||||||
"tag" => true,
|
"kind" => "tag",
|
||||||
"counter" => $unread);
|
"counter" => $unread);
|
||||||
|
|
||||||
array_push($ret_arr, $cv);
|
array_push($ret_arr, $cv);
|
||||||
|
|
Loading…
Reference in New Issue