diff options
author | Andrew Dolgov <[email protected]> | 2019-08-16 12:53:51 +0300 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2019-08-16 12:53:51 +0300 |
commit | 88077702f3a517a0c5b3dbf52acc3f2f51bc6c62 (patch) | |
tree | 17da7c296a12ce21368ce260afdf9b7eb2a566c2 /classes/api.php | |
parent | 24f55d5b919d4b39664b245e51c1d7b984a9966c (diff) | |
parent | a2d26867e653d34a80e504478ebe30ff69ef4a33 (diff) |
Merge branch 'master' of git.fakecake.org:tt-rss
Diffstat (limited to 'classes/api.php')
-rwxr-xr-x | classes/api.php | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/classes/api.php b/classes/api.php index 44c9841ce..01ea1970d 100755 --- a/classes/api.php +++ b/classes/api.php @@ -535,6 +535,7 @@ class API extends Handler { /* Labels */ + /* API only: -4 All feeds, including virtual feeds */ if ($cat_id == -4 || $cat_id == -2) { $counters = Counters::getLabelCounters(true); @@ -582,7 +583,7 @@ class API extends Handler { if ($include_nested && $cat_id) { $sth = $pdo->prepare("SELECT id, title, order_id FROM ttrss_feed_categories - WHERE parent_cat = ? AND owner_uid = ? ORDER BY id, title"); + WHERE parent_cat = ? AND owner_uid = ? ORDER BY order_id, title"); $sth->execute([$cat_id, $_SESSION['uid']]); @@ -611,12 +612,13 @@ class API extends Handler { $limit_qpart = ""; } + /* API only: -3 All feeds, excluding virtual feeds (e.g. Labels and such) */ if ($cat_id == -4 || $cat_id == -3) { $sth = $pdo->prepare("SELECT id, feed_url, cat_id, title, order_id, ". SUBSTRING_FOR_DATE."(last_updated,1,19) AS last_updated FROM ttrss_feeds WHERE owner_uid = ? - ORDER BY cat_id, title " . $limit_qpart); + ORDER BY order_id, title " . $limit_qpart); $sth->execute([$_SESSION['uid']]); } else { @@ -627,7 +629,7 @@ class API extends Handler { FROM ttrss_feeds WHERE (cat_id = :cat OR (:cat = 0 AND cat_id IS NULL)) AND owner_uid = :uid - ORDER BY cat_id, title " . $limit_qpart); + ORDER BY order_id, title " . $limit_qpart); $sth->execute([":uid" => $_SESSION['uid'], ":cat" => $cat_id]); } |