summaryrefslogtreecommitdiff
path: root/api
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2009-12-16 14:08:11 +0300
committerAndrew Dolgov <[email protected]>2009-12-16 14:08:11 +0300
commit7e2b7e461a6504b014cc648332e8462ee698eef5 (patch)
treeecf8155b0160cd42e700ecbee98af21446f21a13 /api
parent1c3fffbbc7f96574f9aba876ec5a21ae78fff73b (diff)
api: show virtual feeds in getFeeds
Diffstat (limited to 'api')
-rw-r--r--api/index.php25
1 files changed, 23 insertions, 2 deletions
diff --git a/api/index.php b/api/index.php
index 789bfca31..f0f7aa202 100644
--- a/api/index.php
+++ b/api/index.php
@@ -108,7 +108,7 @@
if ($unread || !$unread_only) {
- $line_struct = array(
+ $row = array(
"feed_url" => $line["feed_url"],
"title" => $line["title"],
"id" => (int)$line["id"],
@@ -117,7 +117,28 @@
"last_updated" => strtotime($line["last_updated"])
);
- array_push($feeds, $line_struct);
+ array_push($feeds, $row);
+ }
+ }
+
+ if (!$cat_id || $cat_id == -1) {
+ $counters = getLabelCounters($link, false, true);
+
+ foreach (array_keys($counters) as $id) {
+
+ $unread = $counters[$id]["counter"];
+
+ if ($unread || !$unread_only) {
+
+ $row = array(
+ "id" => $id,
+ "title" => $counters[$id]["description"],
+ "unread" => $counters[$id]["counter"],
+ "cat_id" => -1,
+ );
+
+ array_push($feeds, $row);
+ }
}
}