diff options
Diffstat (limited to 'classes/feeds.php')
-rwxr-xr-x | classes/feeds.php | 17 |
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"); |