]> git.wh0rd.org Git - tt-rss.git/commitdiff
API: add order_id to getCategories; add feed_title to getHeadlines; bump api level...
authorAndrew Dolgov <fox@madoka.volgo-balt.ru>
Thu, 8 Mar 2012 15:01:23 +0000 (19:01 +0400)
committerAndrew Dolgov <fox@madoka.volgo-balt.ru>
Thu, 8 Mar 2012 15:01:23 +0000 (19:01 +0400)
classes/api.php
include/functions.php

index 1a79ffe2d6c827aa8be1ee2ea7edc88febe48179..2e9c1b9026500fc4ded8f8966d2f60025d34c675 100644 (file)
@@ -2,7 +2,7 @@
 
 class API extends Handler {
 
-       const API_LEVEL  = 2;
+       const API_LEVEL  = 3;
 
        const STATUS_OK  = 0;
        const STATUS_ERR = 1;
@@ -126,7 +126,7 @@ class API extends Handler {
                // TODO do not return empty categories, return Uncategorized and standard virtual cats
 
                $result = db_query($this->link, "SELECT
-                               id, title FROM ttrss_feed_categories
+                               id, title, order_id FROM ttrss_feed_categories
                        WHERE owner_uid = " .
                        $_SESSION["uid"]);
 
@@ -138,7 +138,9 @@ class API extends Handler {
                        if ($unread || !$unread_only) {
                                array_push($cats, array("id" => $line["id"],
                                        "title" => $line["title"],
-                                       "unread" => $unread));
+                                       "unread" => $unread,
+                                       "order_id" => (int) $line["order_id"],
+                               ));
                        }
                }
 
index dc5cbc816ae431bfe4d4ae2f668b44a684725942..909305af633f876567f09658f60e47970b0c1447 100644 (file)
 
                                $headline_row["labels"] = $labels;
 
+                               $headline_row["feed_title"] = $line["feed_title"];
+
                                array_push($headlines, $headline_row);
                        }