diff options
Diffstat (limited to 'classes')
-rw-r--r-- | classes/dlg.php | 39 | ||||
-rwxr-xr-x | classes/pref/feeds.php | 12 |
2 files changed, 8 insertions, 43 deletions
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 "<header>" . __("Your Public OPML URL is:") . "</header>"; - - print "<section>"; - - print "<div class='panel text-center'>"; - print "<a id='pub_opml_url' href='$url_path' target='_blank'>$url_path</a>"; - print "</div>"; - - print "</section>"; - - print "<footer class='text-center'>"; - - print "<button dojoType='dijit.form.Button' onclick=\"return Helpers.OPML.changeKey()\">". - __('Generate new URL')."</button> "; - - print "<button dojoType='dijit.form.Button' onclick=\"return CommonDialogs.closeInfoBox()\">". - __('Close this window')."</button>"; - - print "</footer>"; - - //return; - } - function explainError() { print "<div class=\"errorExplained\">"; @@ -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 "<footer class='text-center'>"; - print "<button dojoType='dijit.form.Button' class='alt-primary' - onclick=\"document.location.href = 'prefs.php'\">". - __('Open Preferences')."</button> "; - print "<button dojoType='dijit.form.Button' - onclick=\"return dijit.byId('defaultPasswordDlg').hide();\">". - __('Close this window')."</button>"; - print "</footer>"; - } } 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.") . "</p>"; - print "<button dojoType='dijit.form.Button' class='alt-primary' onclick=\"return App.displayDlg('".__("Public OPML URL")."','pubOPMLUrl')\">". + print "<button dojoType='dijit.form.Button' class='alt-primary' onclick=\"return CommonDialogs.publishedOPML()\">". __('Display published OPML URL')."</button> "; 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() { |