From 38e063418dd957ddf896189714799b1e51bf7751 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Tue, 4 Mar 2014 20:27:43 +0400 Subject: [PATCH] public: remove subscribe2 (unused?) --- classes/handler/public.php | 87 -------------------------------------- 1 file changed, 87 deletions(-) diff --git a/classes/handler/public.php b/classes/handler/public.php index 383654df3..2ea7447db 100644 --- a/classes/handler/public.php +++ b/classes/handler/public.php @@ -689,93 +689,6 @@ class Handler_Public extends Handler { } } - function subscribe2() { - $feed_url = $this->dbh->escape_string(trim($_REQUEST["feed_url"])); - $cat_id = $this->dbh->escape_string($_REQUEST["cat_id"]); - /* $from = $this->dbh->escape_string($_REQUEST["from"]); */ - $feed_urls = array(); - - /* only read authentication information from POST */ - - $auth_login = $this->dbh->escape_string(trim($_POST["auth_login"])); - $auth_pass = $this->dbh->escape_string(trim($_POST["auth_pass"])); - - $rc = subscribe_to_feed($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.")); - $contents = @fetch_file_contents($url, false, $auth_login, $auth_pass); - if (is_html($contents)) { - $feed_urls = get_feeds_from_html($url, $contents); - } - break; - case 5: - print_error(T_sprintf("Could not subscribe to %s.
Can't download the Feed URL.", $feed_url)); - break; - } - - 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 = $this->dbh->query("SELECT id FROM ttrss_feeds WHERE - feed_url = '$feed_url' AND owner_uid = " . $_SESSION["uid"]); - - $feed_id = $this->dbh->fetch_result($result, 0, "id"); - } else { - $feed_id = 0; - } - - print "

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

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

"; - - print ""; - } - function index() { header("Content-Type: text/plain"); print json_encode(array("error" => array("code" => 7)));