1
0
mirror of https://git.tt-rss.org/git/tt-rss.git synced 2025-12-13 01:55:55 +00:00

feed tree context menu: add an entry to open originating website

This commit is contained in:
Andrew Dolgov
2021-10-10 22:08:17 +03:00
parent 949e2ab4d2
commit 145fc31625
2 changed files with 26 additions and 0 deletions

View File

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