diff --git a/functions.js b/functions.js index 335ed61ec..e8bd6af33 100644 --- a/functions.js +++ b/functions.js @@ -277,8 +277,9 @@ function gotoMain() { document.location.href = "tt-rss.php"; } -function gotoExportOpml() { - document.location.href = "opml.php?op=Export"; +function gotoExportOpml(filename, settings) { + tmp = settings ? 1 : 0; + document.location.href = "opml.php?op=Export&filename=" + filename + "&settings=" + tmp; } diff --git a/modules/pref-feeds.php b/modules/pref-feeds.php index e16fa9b13..947716e91 100644 --- a/modules/pref-feeds.php +++ b/modules/pref-feeds.php @@ -1440,16 +1440,21 @@ name=\"upload_iframe\" onload=\"opmlImportComplete(this)\" style=\"width: 400px; height: 100px; display: none;\">"; - print "
"; + " . + "" . __('Export Name: ') . + " " . + __('Include Settings? ') . "" . + + "
"; print "".__('Your OPML can be published publicly and can be subscribed by anyone who knows the URL below.');
diff --git a/opml.php b/opml.php
index 2e1eb84c6..991f93e0c 100644
--- a/opml.php
+++ b/opml.php
@@ -10,12 +10,14 @@
init_connection($link);
- function opml_export($link, $owner_uid, $hide_private_feeds=false, $include_settings=true) {
+ function opml_export($link, $name, $owner_uid, $hide_private_feeds=false, $include_settings=true) {
if (!$_REQUEST["debug"]) {
header("Content-type: application/xml+opml");
} else {
header("Content-type: text/xml");
}
+ header("Content-Disposition: attachment; filename=" . $name );
+
print "";
print "