From 86a8351ca2abbacda557819cefb66379a450103c Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Thu, 4 May 2017 14:50:56 +0300 Subject: 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) { --- classes/pref/feeds.php | 12 ++++++------ classes/pref/filters.php | 4 ++-- 2 files changed, 8 insertions(+), 8 deletions(-) (limited to 'classes/pref') diff --git a/classes/pref/feeds.php b/classes/pref/feeds.php index 47c474a0c..4dbc07a9f 100755 --- a/classes/pref/feeds.php +++ b/classes/pref/feeds.php @@ -84,7 +84,7 @@ class Pref_Feeds extends Handler_Protected { $feed['checkbox'] = false; $feed['unread'] = 0; $feed['error'] = $feed_line['last_error']; - $feed['icon'] = getFeedIcon($feed_line['id']); + $feed['icon'] = Feeds::getFeedIcon($feed_line['id']); $feed['param'] = make_local_datetime( $feed_line['last_updated'], true); @@ -246,7 +246,7 @@ class Pref_Feeds extends Handler_Protected { $feed['name'] = $feed_line['title']; $feed['checkbox'] = false; $feed['error'] = $feed_line['last_error']; - $feed['icon'] = getFeedIcon($feed_line['id']); + $feed['icon'] = Feeds::getFeedIcon($feed_line['id']); $feed['param'] = make_local_datetime( $feed_line['last_updated'], true); $feed['unread'] = 0; @@ -278,7 +278,7 @@ class Pref_Feeds extends Handler_Protected { $feed['name'] = $feed_line['title']; $feed['checkbox'] = false; $feed['error'] = $feed_line['last_error']; - $feed['icon'] = getFeedIcon($feed_line['id']); + $feed['icon'] = Feeds::getFeedIcon($feed_line['id']); $feed['param'] = make_local_datetime( $feed_line['last_updated'], true); $feed['unread'] = 0; @@ -1537,7 +1537,7 @@ class Pref_Feeds extends Handler_Protected { if ($cat_id > 0) { $cat_unread = ccache_find($cat_id, $_SESSION["uid"], true); } else if ($cat_id == 0 || $cat_id == -2) { - $cat_unread = getCategoryUnread($cat_id); + $cat_unread = Feeds::getCategoryUnread($cat_id); } $obj['id'] = 'CAT:' . $cat_id; @@ -1555,7 +1555,7 @@ class Pref_Feeds extends Handler_Protected { $feed_id = (int) $feed_id; if (!$title) - $title = getFeedTitle($feed_id, false); + $title = Feeds::getFeedTitle($feed_id, false); if ($unread === false) $unread = getFeedUnread($feed_id, false); @@ -1566,7 +1566,7 @@ class Pref_Feeds extends Handler_Protected { $obj['type'] = 'feed'; $obj['error'] = $error; $obj['updated'] = $updated; - $obj['icon'] = getFeedIcon($feed_id); + $obj['icon'] = Feeds::getFeedIcon($feed_id); $obj['bare_id'] = $feed_id; $obj['auxcounter'] = 0; diff --git a/classes/pref/filters.php b/classes/pref/filters.php index 5e1284092..924588899 100755 --- a/classes/pref/filters.php +++ b/classes/pref/filters.php @@ -226,7 +226,7 @@ class Pref_Filters extends Handler_Protected { $where = sql_bool_to_bool($line["cat_filter"]) ? getCategoryTitle($line["cat_id"]) : ($line["feed_id"] ? - getFeedTitle($line["feed_id"]) : __("All feeds")); + Feeds::getFeedTitle($line["feed_id"]) : __("All feeds")); # $where = $line["cat_id"] . "/" . $line["feed_id"]; @@ -502,7 +502,7 @@ class Pref_Filters extends Handler_Protected { $feed_id = (int) $feed_id; if ($rule["feed_id"]) - $feed = getFeedTitle((int)$rule["feed_id"]); + $feed = Feeds::getFeedTitle((int)$rule["feed_id"]); else $feed = __("All feeds"); } -- cgit v1.2.3