From 97acbaf190ff84b4cc5b01192f14d9ee384d6327 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Mon, 10 Sep 2012 19:01:06 +0400 Subject: login system fixes remove old-style session checking from backend.php move outside subscription endpoint to public.php, change subscription bookmarklet --- classes/pref/feeds.php | 105 ------------------------------------------------- 1 file changed, 105 deletions(-) (limited to 'classes/pref/feeds.php') diff --git a/classes/pref/feeds.php b/classes/pref/feeds.php index d6bb94ebe..a1177f2dd 100644 --- a/classes/pref/feeds.php +++ b/classes/pref/feeds.php @@ -1168,111 +1168,6 @@ class Pref_Feeds extends Handler_Protected { } - function add() { - $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') { - header('Content-Type: text/html; charset=utf-8'); - print " - - Tiny Tiny RSS - - - - - \"Tiny -

Subscribe to feed...

"; - } - - $rc = subscribe_to_feed($this->link, $feed_url, $cat_id, $auth_login, $auth_pass); - - switch ($rc) { - case 1: - print_notice(T_sprintf("Subscribed to %s.", $feed_url)); - break; - case 2: - print_error(T_sprintf("Could not subscribe to %s.", $feed_url)); - break; - case 3: - print_error(T_sprintf("No feeds found in %s.", $feed_url)); - break; - case 0: - print_warning(T_sprintf("Already subscribed to %s.", $feed_url)); - break; - case 4: - print_notice(__("Multiple feed URLs found.")); - - $feed_urls = get_feeds_from_html($feed_url); - break; - case 5: - print_error(T_sprintf("Could not subscribe to %s.
Can't download the Feed URL.", $feed_url)); - break; - } - - if ($p_from != 'tt-rss') { - - if ($feed_urls) { - - print "
"; - print ""; - print ""; - print ""; - - print ""; - - print "
"; - } - - $tp_uri = get_self_url_prefix() . "/prefs.php"; - $tt_uri = get_self_url_prefix(); - - if ($rc <= 2){ - $result = db_query($this->link, "SELECT id FROM ttrss_feeds WHERE - feed_url = '$feed_url' AND owner_uid = " . $_SESSION["uid"]); - - $feed_id = db_fetch_result($result, 0, "id"); - } else { - $feed_id = 0; - } - print "

"; - - if ($feed_id) { - print "

- - - - -
"; - } - - print "
- -

"; - - print ""; - return; - } - } - function categorize() { $ids = split(",", db_escape_string($_REQUEST["ids"])); -- cgit v1.2.3