diff options
author | Andrew Dolgov <[email protected]> | 2017-05-04 14:50:56 +0300 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2017-05-04 14:50:56 +0300 |
commit | 86a8351ca2abbacda557819cefb66379a450103c (patch) | |
tree | e50d01443417ee8fee24440b466fe87e8e049a95 /classes/api.php | |
parent | 7e5f8d9fb323dc5e47f545984c6f9b3d320a2912 (diff) |
move the following to Feeds:
+ static function catchup_feed($feed, $cat_view, $owner_uid = false, $mode = 'all', $search = false) {
+ static function getFeedArticles($feed, $is_cat = false, $unread_only = false,
+ static function subscribe_to_feed($url, $cat_id = 0,
+ static function getFeedIcon($id) {
+ static function getFeedTitle($id, $cat = false) {
+ static function getCategoryUnread($cat, $owner_uid = false) {
+ static function getCategoryChildrenUnread($cat, $owner_uid = false) {
Diffstat (limited to 'classes/api.php')
-rw-r--r-- | classes/api.php | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/classes/api.php b/classes/api.php index 65bca190d..ad3ccea09 100644 --- a/classes/api.php +++ b/classes/api.php @@ -152,7 +152,7 @@ class API extends Handler { $unread = getFeedUnread($line["id"], true); if ($enable_nested) - $unread += getCategoryChildrenUnread($line["id"]); + $unread += Feeds::getCategoryChildrenUnread($line["id"]); if ($unread || !$unread_only) { array_push($cats, array("id" => $line["id"], @@ -427,7 +427,7 @@ class API extends Handler { $feed_id = $this->dbh->escape_string($_REQUEST["feed_id"]); $is_cat = $this->dbh->escape_string($_REQUEST["is_cat"]); - catchup_feed($feed_id, $is_cat); + Feeds::catchup_feed($feed_id, $is_cat); $this->wrap(self::STATUS_OK, array("status" => "OK")); } @@ -564,7 +564,7 @@ class API extends Handler { $unread = getFeedUnread($i); if ($unread || !$unread_only) { - $title = getFeedTitle($i); + $title = Feeds::getFeedTitle($i); $row = array( "id" => $i, @@ -588,7 +588,7 @@ class API extends Handler { while ($line = db_fetch_assoc($result)) { $unread = getFeedUnread($line["id"], true) + - getCategoryChildrenUnread($line["id"]); + Feeds::getCategoryChildrenUnread($line["id"]); if ($unread || !$unread_only) { $row = array( @@ -840,7 +840,7 @@ class API extends Handler { $password = $this->dbh->escape_string($_REQUEST["password"]); if ($feed_url) { - $rc = subscribe_to_feed($feed_url, $category_id, $login, $password); + $rc = Feeds::subscribe_to_feed($feed_url, $category_id, $login, $password); $this->wrap(self::STATUS_OK, array("status" => $rc)); } else { |