mirror of
https://git.tt-rss.org/git/tt-rss.git
synced 2025-12-13 20:35:55 +00:00
api: add include_empty to getCategories/getFeedTree
This commit is contained in:
@@ -33,8 +33,10 @@ class Pref_Feeds extends Handler_Protected {
|
||||
|
||||
if ($search) $search_qpart = " AND LOWER(title) LIKE LOWER('%$search%')";
|
||||
|
||||
$show_empty_cats = $_REQUEST['mode'] != 2 && !$search &&
|
||||
get_pref($this->link, '_PREFS_SHOW_EMPTY_CATS');
|
||||
// first one is set by API
|
||||
$show_empty_cats = $_REQUEST['force_show_empty'] ||
|
||||
($_REQUEST['mode'] != 2 && !$search &&
|
||||
get_pref($this->link, '_PREFS_SHOW_EMPTY_CATS'));
|
||||
|
||||
$items = array();
|
||||
|
||||
@@ -183,8 +185,9 @@ class Pref_Feeds extends Handler_Protected {
|
||||
}
|
||||
|
||||
if ($enable_cats) {
|
||||
$show_empty_cats = $_REQUEST['mode'] != 2 && !$search &&
|
||||
get_pref($this->link, '_PREFS_SHOW_EMPTY_CATS');
|
||||
$show_empty_cats = $_REQUEST['force_show_empty'] ||
|
||||
($_REQUEST['mode'] != 2 && !$search &&
|
||||
get_pref($this->link, '_PREFS_SHOW_EMPTY_CATS'));
|
||||
|
||||
$result = db_query($this->link, "SELECT id, title FROM ttrss_feed_categories
|
||||
WHERE owner_uid = " . $_SESSION["uid"] . " AND parent_cat IS NULL ORDER BY order_id, title");
|
||||
|
||||
Reference in New Issue
Block a user