diff options
author | Andrew Dolgov <[email protected]> | 2007-04-25 16:00:08 +0100 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2007-04-25 16:00:08 +0100 |
commit | f27de5153111f07ecfa6204baa2b77c93b48a09d (patch) | |
tree | a6e606e9458ef6c5915fb060c153beebc02c27d3 /modules/pref-feeds.php | |
parent | bce7001fd1f1c2f105e7ebe9d1b533cf553bb3c5 (diff) |
add auth support to subscribe-to-feed dialog
Diffstat (limited to 'modules/pref-feeds.php')
-rw-r--r-- | modules/pref-feeds.php | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/modules/pref-feeds.php b/modules/pref-feeds.php index 61fc2167c..c11ce2aa3 100644 --- a/modules/pref-feeds.php +++ b/modules/pref-feeds.php @@ -425,9 +425,14 @@ if (!WEB_DEMO_MODE) { - $feed_url = db_escape_string(trim($_POST["feed_url"])); - $cat_id = db_escape_string($_POST["cat_id"]); - $p_from = db_escape_string($_POST["from"]); + $feed_url = db_escape_string(trim($_REQUEST["feed_url"])); + $cat_id = db_escape_string($_REQUEST["cat_id"]); + $p_from = db_escape_string($_REQUEST["from"]); + + /* only read authentication information from POST */ + + $auth_login = db_escape_string(trim($_POST["auth_login"])); + $auth_pass = db_escape_string(trim($_POST["auth_pass"])); if ($p_from != 'tt-rss') { print "<html> @@ -442,7 +447,7 @@ <div class=\"content\">"; } - if (subscribe_to_feed($link, $feed_url, $cat_id)) { + if (subscribe_to_feed($link, $feed_url, $cat_id, $auth_login, $auth_pass)) { print_notice(T_sprintf("Subscribed to <b>%s</b>.", $feed_url)); } else { print_warning(T_sprintf("Already subscribed to <b>%s</b>.", $feed_url)); |