]> git.wh0rd.org Git - tt-rss.git/commitdiff
pref/feeds: start user category ordering from 1
authorAndrew Dolgov <noreply@fakecake.org>
Mon, 26 Jun 2017 13:29:57 +0000 (16:29 +0300)
committerAndrew Dolgov <noreply@fakecake.org>
Mon, 26 Jun 2017 13:29:57 +0000 (16:29 +0300)
api, getFeeds: send subcategory order_id

classes/api.php
classes/pref/feeds.php

index 0176e167230a5d1740bb6055bfca57d0bc5f5df1..00e58ee502b1d31c502680b57ce748cd129e1743 100644 (file)
@@ -569,7 +569,7 @@ class API extends Handler {
 
                        if ($include_nested && $cat_id) {
                                $result = db_query("SELECT
-                                       id, title FROM ttrss_feed_categories
+                                       id, title, order_id FROM ttrss_feed_categories
                                        WHERE parent_cat = '$cat_id' AND owner_uid = " . $_SESSION["uid"] .
                                " ORDER BY id, title");
 
@@ -583,6 +583,7 @@ class API extends Handler {
                                                                "title" => $line["title"],
                                                                "unread" => $unread,
                                                                "is_cat" => true,
+                                "order_id" => (int) $line["order_id"]
                                                        );
                                                array_push($feeds, $row);
                                        }
index 785451707a412f7fda6d5990431f26d7d4b00dcd..b0f82e7e4228a044460a868bde43133a936dd90c 100755 (executable)
@@ -339,7 +339,7 @@ class Pref_Feeds extends Handler_Protected {
                                owner_uid = " . $_SESSION["uid"]);
                }
 
-               $order_id = 0;
+               $order_id = 1;
 
                $cat = $data_map[$item_id];