summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2012-03-08 19:01:23 +0400
committerAndrew Dolgov <[email protected]>2012-03-08 19:01:23 +0400
commitb11e9943d86c373d458725b50524d83f17fe4b70 (patch)
tree217d35bc961443182049192929eab98d5fa5b671
parent5b7bd238eeed1aa83fe47f715c79b16b42ab347f (diff)
API: add order_id to getCategories; add feed_title to getHeadlines; bump api level to 3
-rw-r--r--classes/api.php8
-rw-r--r--include/functions.php2
2 files changed, 7 insertions, 3 deletions
diff --git a/classes/api.php b/classes/api.php
index 1a79ffe2d..2e9c1b902 100644
--- a/classes/api.php
+++ b/classes/api.php
@@ -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"],
+ ));
}
}
diff --git a/include/functions.php b/include/functions.php
index dc5cbc816..909305af6 100644
--- a/include/functions.php
+++ b/include/functions.php
@@ -4510,6 +4510,8 @@
$headline_row["labels"] = $labels;
+ $headline_row["feed_title"] = $line["feed_title"];
+
array_push($headlines, $headline_row);
}