Browse Source

pref/feeds: start user category ordering from 1
api, getFeeds: send subcategory order_id

Andrew Dolgov 3 years ago
parent
commit
c053b97697
2 changed files with 3 additions and 2 deletions
  1. 2 1
      classes/api.php
  2. 1 1
      classes/pref/feeds.php

+ 2 - 1
classes/api.php

@@ -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);
 					}

+ 1 - 1
classes/pref/feeds.php

@@ -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];