]> git.wh0rd.org Git - tt-rss.git/commitdiff
api/getCategories: return virtual categories and Uncategorized
authorAndrew Dolgov <fox@madoka.volgo-balt.ru>
Tue, 29 Nov 2011 05:22:38 +0000 (09:22 +0400)
committerAndrew Dolgov <fox@madoka.volgo-balt.ru>
Tue, 29 Nov 2011 05:22:38 +0000 (09:22 +0400)
api/index.php

index 0453dcb361a820b15e669aed27a811ec68932e82..1c4c52fd9479875115eeb8b4b9a0d38fb8ce67b8 100644 (file)
                                }
                        }
 
+                       foreach (array(-2,-1,0) as $cat_id) {
+                               $unread = getFeedUnread($link, $cat_id, true);
+
+                               if ($unread || !$unread_only) {
+                                       array_push($cats, array("id" => $cat_id,
+                                               "title" => getCategoryTitle($link, $cat_id),
+                                               "unread" => $unread));
+                               }
+                       }
+
                        print api_wrap_reply(API_STATUS_OK, $seq, $cats);
                        break;