feed tree context menu: add an entry to open originating website
This commit is contained in:
parent
949e2ab4d2
commit
145fc31625
|
@ -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");
|
||||
|
||||
|
|
|
@ -101,6 +101,15 @@ define(["dojo/_base/declare", "dojo/dom-construct", "dojo/_base/array", "dojo/co
|
|||
CommonDialogs.editFeed(this.getParent().row_id, false);
|
||||
}}));
|
||||
|
||||
menu.addChild(new dijit.MenuItem({
|
||||
label: __("Open site"),
|
||||
onClick: function() {
|
||||
App.postOpenWindow("backend.php", {op: "feeds", method: "opensite",
|
||||
feed_id: this.getParent().row_id, csrf_token: __csrf_token});
|
||||
}}));
|
||||
|
||||
menu.addChild(new dijit.MenuSeparator());
|
||||
|
||||
menu.addChild(new dijit.MenuItem({
|
||||
label: __("Debug feed"),
|
||||
onClick: function() {
|
||||
|
|
Loading…
Reference in New Issue