diff --git a/classes/api.php b/classes/api.php index 8c32967a2..03eea1927 100755 --- a/classes/api.php +++ b/classes/api.php @@ -843,7 +843,7 @@ class API extends Handler { $_REQUEST['force_show_empty'] = $include_empty; $this->_wrap(self::STATUS_OK, - array("categories" => $pf->makefeedtree())); + array("categories" => $pf->_makefeedtree())); } // only works for labels or uncategorized for the time being diff --git a/classes/pref/feeds.php b/classes/pref/feeds.php index 2c275349b..cf9e7c95e 100755 --- a/classes/pref/feeds.php +++ b/classes/pref/feeds.php @@ -1,7 +1,7 @@ makefeedtree()); + print json_encode($this->_makefeedtree()); } - function makefeedtree() { + function _makefeedtree() { if (clean($_REQUEST['mode'] ?? 0) != 2) $search = $_SESSION["prefs_feed_search"] ?? ""; @@ -500,7 +496,7 @@ class Pref_Feeds extends Handler_Protected { WHERE id = ?"); $sth->execute([$feed_id]); - $rc = 0; + $rc = Feeds::_get_icon($feed_id); } } } else { @@ -573,298 +569,6 @@ class Pref_Feeds extends Handler_Protected { } else { print json_encode(["error" => "FEED_NOT_FOUND"]); } - - return; - - if ($row = $sth->fetch()) { - print '