summaryrefslogtreecommitdiff
path: root/classes
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2021-02-12 08:22:00 +0300
committerAndrew Dolgov <[email protected]>2021-02-12 08:22:00 +0300
commit83b0738b04d1af07614164d66f8aa11d2465f539 (patch)
treeb283daba7d8d3917a2ecb9366771161a42eb483b /classes
parent3134d71b8faa96326e1cf11b949343952155c837 (diff)
opml import: no more iframe, use client dialog
Diffstat (limited to 'classes')
-rw-r--r--classes/dlg.php22
-rwxr-xr-xclasses/pref/feeds.php15
2 files changed, 7 insertions, 30 deletions
diff --git a/classes/dlg.php b/classes/dlg.php
index f62a42b4d..4240ad222 100644
--- a/classes/dlg.php
+++ b/classes/dlg.php
@@ -13,28 +13,6 @@ class Dlg extends Handler_Protected {
return false;
}
- function importOpml() {
- print_notice("If you have imported labels and/or filters, you might need to reload preferences to see your new data.");
-
- print "<div class='panel panel-scrollable'>";
-
- $opml = new OPML($_REQUEST);
-
- $opml->opml_import($_SESSION["uid"]);
-
- print "</div>";
-
- print "<footer class='text-center'>";
- print "<button dojoType='dijit.form.Button'
- onclick=\"dijit.byId('opmlImportDlg').execute()\">".
- __('Close this window')."</button>";
- print "</footer>";
-
- print "</div>";
-
- //return;
- }
-
function printTagCloud() {
print "<div class='panel text-center'>";
diff --git a/classes/pref/feeds.php b/classes/pref/feeds.php
index 949b23c20..5fcafeaae 100755
--- a/classes/pref/feeds.php
+++ b/classes/pref/feeds.php
@@ -1194,6 +1194,11 @@ class Pref_Feeds extends Handler_Protected {
Feeds::add_feed_category($feed_cat);
}
+ function importOpml() {
+ $opml = new OPML($_REQUEST);
+ $opml->opml_import($_SESSION["uid"]);
+ }
+
function index() {
print "<div dojoType='dijit.layout.AccordionContainer' region='center'>";
@@ -1340,17 +1345,11 @@ class Pref_Feeds extends Handler_Protected {
print_notice("Only main settings profile can be migrated using OPML.");
- print "<iframe id=\"upload_iframe\"
- name=\"upload_iframe\" onload=\"Helpers.OPML.onImportComplete(this)\"
- style=\"width: 400px; height: 100px; display: none;\"></iframe>";
-
- print "<form name='opml_form' style='display : inline-block' target='upload_iframe'
- enctype='multipart/form-data' method='POST'
- action='backend.php'>
+ print "<form id='opml_import_form' method='post' enctype='multipart/form-data' >
<label class='dijitButton'>".__("Choose file...")."
<input style='display : none' id='opml_file' name='opml_file' type='file'>&nbsp;
</label>
- <input type='hidden' name='op' value='dlg'>
+ <input type='hidden' name='op' value='pref-feeds'>
<input type='hidden' name='csrf_token' value='".$_SESSION['csrf_token']."'>
<input type='hidden' name='method' value='importOpml'>
<button dojoType='dijit.form.Button' class='alt-primary' onclick=\"return Helpers.OPML.import();\" type=\"submit\">" .