]> git.wh0rd.org Git - tt-rss.git/commitdiff
change counter.cat and counter.tag to counter.kind
authorAndrew Dolgov <fox@madoka.volgo-balt.ru>
Fri, 5 Nov 2010 13:38:55 +0000 (16:38 +0300)
committerAndrew Dolgov <fox@madoka.volgo-balt.ru>
Fri, 5 Nov 2010 13:38:55 +0000 (16:38 +0300)
functions.js
functions.php

index 01c3c0508b9e8f46352249d38670219b45359525..f6b7ec335e9c582cd90f86ff02fda4aa2ba18455 100644 (file)
@@ -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 + ")";
index e39a04ca4efc9de57c10a0a04de8f9c01032dbaf..be3937642109f241792158784d1c66092f3cc7f2 100644 (file)
 
                /* Labels category */
 
-               $cv = array("id" => -2, "cat" => true,
+               $cv = array("id" => -2, "kind" => "cat",
                        "counter" => getCategoryUnread($link, -2));
 
                array_push($ret_arr, $cv);
                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);
                        $tag = htmlspecialchars($tag);
 
                        $cv = array("id" => $tag,
-                               "tag" => true,
+                               "kind" => "tag",
                                "counter" => $unread);
 
                        array_push($ret_arr, $cv);