From c50a4296a58f64e0b60fbd3e2eff14b916134160 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Thu, 4 Mar 2021 15:54:44 +0300 Subject: [PATCH] split vf_shared --- plugins/vf_shared/init.php | 69 -------------------------------------- 1 file changed, 69 deletions(-) delete mode 100644 plugins/vf_shared/init.php diff --git a/plugins/vf_shared/init.php b/plugins/vf_shared/init.php deleted file mode 100644 index 90179c08c..000000000 --- a/plugins/vf_shared/init.php +++ /dev/null @@ -1,69 +0,0 @@ -host = $host; - - $host->add_feed(-1, __("Shared articles"), 'link', $this); - } - - function api_version() { - return 2; - } - - function get_unread($feed_id) { - $sth = $this->pdo->prepare("select count(int_id) AS count - from ttrss_user_entries where owner_uid = ? and unread = true and uuid != ''"); - $sth->execute([$_SESSION['uid']]); - - if ($row = $sth->fetch()) { - return $row['count']; - } - - return 0; - } - - function get_total($feed_id) { - $sth = $this->pdo->prepare("select count(int_id) AS count - from ttrss_user_entries where owner_uid = ? and uuid != ''"); - $sth->execute([$_SESSION['uid']]); - - if ($row = $sth->fetch()) { - return $row['count']; - } - - return 0; - } - - function get_headlines($feed_id, $options) { - $params = array( - "feed" => -4, - "limit" => $options["limit"], - "view_mode" => $this->get_unread(-1) > 0 ? "adaptive" : "all_articles", - "search" => $options['search'], - "override_order" => $options['override_order'], - "offset" => $options["offset"], - "filter" => $options["filter"], - "since_id" => $options["since_id"], - "include_children" => $options["include_children"], - "override_strategy" => "uuid != ''", - "override_vfeed" => "ttrss_feeds.title AS feed_title," - ); - - $qfh_ret = Feeds::_get_headlines($params); - $qfh_ret[1] = __("Shared articles"); - - return $qfh_ret; - } - -}