From: Andrew Dolgov Date: Thu, 1 Mar 2018 12:43:40 +0000 (+0300) Subject: feed editor: expose site_url for editing X-Git-Tag: 18.8~58 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=c9a5e5aa2875008931f4f75ba7d01fd5439cd0ea;p=tt-rss.git feed editor: expose site_url for editing --- diff --git a/classes/pref/feeds.php b/classes/pref/feeds.php index c0b209f5..03f82033 100755 --- a/classes/pref/feeds.php +++ b/classes/pref/feeds.php @@ -565,6 +565,18 @@ class Pref_Feeds extends Handler_Protected { 'dojoType="dijit.form.Select"'); } + /* Site URL */ + + $site_url = htmlspecialchars($row["site_url"]); + + print "
"; + + print __('Site URL:') . " "; + print ""; + /* FTS Stemming Language */ if (DB_TYPE == "pgsql") { @@ -623,7 +635,6 @@ class Pref_Feeds extends Handler_Protected { autocomplete=\"new-password\" name=\"auth_login\" value=\"$auth_login\">
"; - print "pdo->prepare("SELECT feed_url FROM ttrss_feeds WHERE id = ?"); + /* $sth = $this->pdo->prepare("SELECT feed_url FROM ttrss_feeds WHERE id = ?"); $sth->execute([$feed_id]); - $row = $sth->fetch(); - $orig_feed_url = $row["feed_url"]; + $row = $sth->fetch();$orig_feed_url = $row["feed_url"]; - $reset_basic_info = $orig_feed_url != $feed_url; + $reset_basic_info = $orig_feed_url != $feed_url; */ $sth = $this->pdo->prepare("UPDATE ttrss_feeds SET cat_id = :cat_id, title = :title, feed_url = :feed_url, + site_url = :site_url, update_interval = :upd_intl, purge_interval = :purge_intl, auth_login = :auth_login, @@ -985,6 +997,7 @@ class Pref_Feeds extends Handler_Protected { $sth->execute([":title" => $feed_title, ":cat_id" => $cat_id ? $cat_id : null, ":feed_url" => $feed_url, + ":site_url" => $site_url, ":upd_intl" => $upd_intl, ":purge_intl" => $purge_intl, ":auth_login" => $auth_login, @@ -999,9 +1012,9 @@ class Pref_Feeds extends Handler_Protected { ":id" => $feed_id, ":uid" => $_SESSION['uid']]); - if ($reset_basic_info) { +/* if ($reset_basic_info) { RSSUtils::set_basic_feed_info($feed_id); - } + } */ PluginHost::getInstance()->run_hooks(PluginHost::HOOK_PREFS_SAVE_FEED, "hook_prefs_save_feed", $feed_id);