summaryrefslogtreecommitdiff
path: root/classes/feeds.php
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2021-10-10 22:08:17 +0300
committerAndrew Dolgov <[email protected]>2021-10-10 22:08:17 +0300
commit145fc3162526e221c9092df6df414a9b1465dd58 (patch)
tree0e7033af8d2c3200c199bcd1698a0c441d1d2f80 /classes/feeds.php
parent949e2ab4d283244594414fa09d100187865c0657 (diff)
feed tree context menu: add an entry to open originating website
Diffstat (limited to 'classes/feeds.php')
-rwxr-xr-xclasses/feeds.php17
1 files changed, 17 insertions, 0 deletions
diff --git a/classes/feeds.php b/classes/feeds.php
index 348c42c9e..7b6b35645 100755
--- a/classes/feeds.php
+++ b/classes/feeds.php
@@ -587,6 +587,23 @@ class Feeds extends Handler_Protected {
]);
}
+ function opensite() {
+ $feed = ORM::for_table('ttrss_feeds')
+ ->find_one((int)$_REQUEST['feed_id']);
+
+ if ($feed) {
+ $site_url = UrlHelper::validate($feed->site_url);
+
+ if ($site_url) {
+ header("Location: $site_url");
+ return;
+ }
+ }
+
+ header($_SERVER["SERVER_PROTOCOL"]." 404 Not Found");
+ print "Feed not found or has an empty site URL.";
+ }
+
function updatedebugger() {
header("Content-type: text/html");