From 1c9bda915bb8a734af27cc3a2d2dd1cc16f2d5fd Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Mon, 1 Apr 2013 11:14:27 +0400 Subject: move several methods from dlg; fix displayed tags not updated after editing --- classes/feeds.php | 185 +++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 184 insertions(+), 1 deletion(-) (limited to 'classes/feeds.php') diff --git a/classes/feeds.php b/classes/feeds.php index a80ae4b3c..d2df94108 100644 --- a/classes/feeds.php +++ b/classes/feeds.php @@ -4,7 +4,7 @@ require_once "colors.php"; class Feeds extends Handler_Protected { function csrf_ignore($method) { - $csrf_ignored = array("index"); + $csrf_ignored = array("index", "feedbrowser", "quickaddfeed", "search"); return array_search($method, $csrf_ignored) !== false; } @@ -968,5 +968,188 @@ class Feeds extends Handler_Protected { return $reply; } + function quickAddFeed() { + print ""; + print ""; + + print "
".__("Feed or site URL")."
"; + print "
"; + + print "
+
"; + + print ""; + + print "
"; + + 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 "
+ "; + + if (!(defined('_DISABLE_FEED_BROWSER') && _DISABLE_FEED_BROWSER)) { + print ""; + } + + print " +
"; + + //return; + } + + function feedBrowser() { + if (defined('_DISABLE_FEED_BROWSER') && _DISABLE_FEED_BROWSER) return; + + $browser_search = db_escape_string($this->link, $_REQUEST["search"]); + + print ""; + print ""; + + print "
+
+ + + +
"; + + print " "; + + print __("limit:"); + + print " "; + + print "
"; + + $owner_uid = $_SESSION["uid"]; + + require_once "feedbrowser.php"; + + print ""; + + print "
+ + +
"; + + } + + function search() { + $this->params = explode(":", db_escape_string($this->link, $_REQUEST["param"]), 2); + + $active_feed_id = sprintf("%d", $this->params[0]); + $is_cat = $this->params[1] != "false"; + + print "
".__('Look for')."
"; + + print "
"; + + print ""; + + print "
".__('Limit search to:')." "; + + print ""; + + print "
"; + + print "
"; + + if (!SPHINX_ENABLED) { + print "
+ Search syntax +
"; + } + + print " + +
"; + } + + } ?> -- cgit v1.2.3-54-g00ecf