From 201bb1ca54c6227b7d6e7414303e357461892c2a Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Mon, 1 Apr 2013 12:36:57 +0400 Subject: [PATCH] move batchSubscribe to pref-feeds --- classes/dlg.php | 48 -------------------------------------- classes/pref/feeds.php | 52 +++++++++++++++++++++++++++++++++++++++++- js/prefs.js | 2 +- 3 files changed, 52 insertions(+), 50 deletions(-) diff --git a/classes/dlg.php b/classes/dlg.php index 32a3b230a..e56560a47 100644 --- a/classes/dlg.php +++ b/classes/dlg.php @@ -268,53 +268,5 @@ class Dlg extends Handler_Protected { } - function batchSubscribe() { - print ""; - print ""; - - print "
- ".__("Add one valid RSS feed per line (no feed detection is done)")." - "; - if (get_pref($this->link, 'ENABLE_FEED_CATS')) { - print __('Place in category:') . " "; - print_feed_cat_select($this->link, "cat", false, 'dojoType="dijit.form.Select"'); - } - print "
"; - print ""; - - print "
"; - - print ""; - - print "
"; - - print "
- -
"; - - print ""; - - print "
"; - - print "
- - -
"; - } - } ?> diff --git a/classes/pref/feeds.php b/classes/pref/feeds.php index 1983987ab..e48953e94 100644 --- a/classes/pref/feeds.php +++ b/classes/pref/feeds.php @@ -3,7 +3,8 @@ class Pref_Feeds extends Handler_Protected { function csrf_ignore($method) { $csrf_ignored = array("index", "getfeedtree", "add", "editcats", "editfeed", - "savefeedorder", "uploadicon", "feedswitherrors", "inactivefeeds"); + "savefeedorder", "uploadicon", "feedswitherrors", "inactivefeeds", + "batchsubscribe"); return array_search($method, $csrf_ignored) !== false; } @@ -1749,5 +1750,54 @@ class Pref_Feeds extends Handler_Protected { } } + function batchSubscribe() { + print ""; + print ""; + + print "
+ ".__("Add one valid RSS feed per line (no feed detection is done)")." + "; + if (get_pref($this->link, 'ENABLE_FEED_CATS')) { + print __('Place in category:') . " "; + print_feed_cat_select($this->link, "cat", false, 'dojoType="dijit.form.Select"'); + } + print "
"; + print ""; + + print "
"; + + print ""; + + print "
"; + + print "
+ +
"; + + print ""; + + print "
"; + + print "
+ + +
"; + } + + } ?> diff --git a/js/prefs.js b/js/prefs.js index 30dad0d88..5ba1e5d3d 100644 --- a/js/prefs.js +++ b/js/prefs.js @@ -1759,7 +1759,7 @@ function gotoExportOpml(filename, settings) { function batchSubscribe() { try { - var query = "backend.php?op=dlg&method=batchSubscribe"; + var query = "backend.php?op=pref-feeds&method=batchSubscribe"; // overlapping widgets if (dijit.byId("batchSubDlg")) dijit.byId("batchSubDlg").destroyRecursive();