diff options
author | Andrew Dolgov <[email protected]> | 2011-11-29 09:22:38 +0400 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2011-11-29 09:22:38 +0400 |
commit | 75b901d9293d6481886e5b4352d49ea0bcdd170d (patch) | |
tree | 96396a706e7fdf1e935342fd41e91d982b825774 | |
parent | e9ed9ec844e2b22418814846a9998fa1ba81a963 (diff) |
api/getCategories: return virtual categories and Uncategorized
-rw-r--r-- | api/index.php | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/api/index.php b/api/index.php index 0453dcb36..1c4c52fd9 100644 --- a/api/index.php +++ b/api/index.php @@ -191,6 +191,16 @@ } } + 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; |