1
0
mirror of https://git.tt-rss.org/git/tt-rss.git synced 2025-12-13 15:25:59 +00:00

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) {
This commit is contained in:
Andrew Dolgov
2017-05-04 14:50:56 +03:00
parent 7e5f8d9fb3
commit 86a8351ca2
12 changed files with 497 additions and 498 deletions

View File

@@ -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;

View File

@@ -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");
}