From 1a680d4eae7a5a6adb856f4db8adaa04ea4d64e3 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Thu, 11 Feb 2021 21:42:38 +0300 Subject: publishedOPML: use client dialog --- classes/dlg.php | 39 --------------------------------------- classes/pref/feeds.php | 12 ++++++++---- 2 files changed, 8 insertions(+), 43 deletions(-) (limited to 'classes') diff --git a/classes/dlg.php b/classes/dlg.php index 64f9aca9d..7c07cf4f1 100644 --- a/classes/dlg.php +++ b/classes/dlg.php @@ -35,32 +35,6 @@ class Dlg extends Handler_Protected { //return; } - function pubOPMLUrl() { - $url_path = Opml::opml_publish_url(); - - print "
" . __("Your Public OPML URL is:") . "
"; - - print "
"; - - print "
"; - print "$url_path"; - print "
"; - - print "
"; - - print ""; - - //return; - } - function explainError() { print "
"; @@ -191,17 +165,4 @@ class Dlg extends Handler_Protected { //return; } - function defaultPasswordWarning() { - - print_warning(__("You are using default tt-rss password. Please change it in the Preferences (Personal data / Authentication).")); - - print "
"; - print " "; - print ""; - print "
"; - } } diff --git a/classes/pref/feeds.php b/classes/pref/feeds.php index 0b12bda13..cb2e79853 100755 --- a/classes/pref/feeds.php +++ b/classes/pref/feeds.php @@ -1379,7 +1379,7 @@ class Pref_Feeds extends Handler_Protected { " " . __("Published OPML does not include your Tiny Tiny RSS settings, feeds that require authentication or feeds hidden from Popular feeds.") . "

"; - print " "; PluginHost::getInstance()->run_hooks(PluginHost::HOOK_PREFS_TAB_SECTION, "prefFeedsOPML"); @@ -1706,13 +1706,17 @@ class Pref_Feeds extends Handler_Protected { } } + function getOPMLKey() { + print json_encode(["link" => OPML::opml_publish_url()]); + } + function regenOPMLKey() { $this->update_feed_access_key('OPML:Publish', - false, $_SESSION["uid"]); + false, $_SESSION["uid"]); - $new_link = Opml::opml_publish_url(); + $new_link = OPML::opml_publish_url(); - print json_encode(array("link" => $new_link)); + print json_encode(["link" => $new_link]); } function regenFeedKey() { -- cgit v1.2.3-54-g00ecf