summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2009-02-05 21:59:23 +0300
committerAndrew Dolgov <[email protected]>2009-02-05 21:59:23 +0300
commitd8781c912dc0476af3ac7b858aedf6f3089e604e (patch)
tree6cc977b3eaab0339aa17f6c2a322f1ea6f547b41 /modules
parent3ab18266616f903810353b752c80ea6d36442a58 (diff)
offline: store cat_id in feeds table, backend: output category info
Diffstat (limited to 'modules')
-rw-r--r--modules/backend-rpc.php25
1 files changed, 21 insertions, 4 deletions
diff --git a/modules/backend-rpc.php b/modules/backend-rpc.php
index eac84afa5..edc167695 100644
--- a/modules/backend-rpc.php
+++ b/modules/backend-rpc.php
@@ -530,22 +530,39 @@
if ($stage == 0) {
print "<feeds>";
- $reply = array();
-
- $result = db_query($link, "SELECT id, title FROM
+ $result = db_query($link, "SELECT id, title, cat_id FROM
ttrss_feeds WHERE owner_uid = ".$_SESSION["uid"]);
while ($line = db_fetch_assoc($result)) {
$has_icon = (int) feed_has_icon($line["id"]);
- print "<feed has_icon=\"$has_icon\" id=\"".$line["id"]."\"><![CDATA[";
+ print "<feed has_icon=\"$has_icon\"
+ cat_id=\"".(int)$line["cat_id"]."\" id=\"".$line["id"]."\"><![CDATA[";
print $line["title"];
print "]]></feed>";
}
print "</feeds>";
+ print "<feed-categories>";
+
+ $result = db_query($link, "SELECT id, title FROM
+ ttrss_feed_categories WHERE owner_uid = ".$_SESSION["uid"]);
+
+ print "<category id=\"0\"><![CDATA[";
+ print __("Uncategorized");
+ print "]]></category>";
+
+ while ($line = db_fetch_assoc($result)) {
+ print "<category id=\"".$line["id"]."\"><![CDATA[";
+ print $line["title"];
+ print "]]></category>";
+ }
+
+ print "</feed-categories>";
+
+
}
if ($stage > 0) {