diff options
author | Andrew Dolgov <[email protected]> | 2011-04-20 15:21:00 +0400 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2011-04-20 15:21:00 +0400 |
commit | ae5f7bb11a7698a84c9352436c144286f7c81630 (patch) | |
tree | fbf541a0009cd8462d5137b04ffcea0113df37bc /modules/backend-rpc.php | |
parent | cfc0647184933b042b9929ede09f52e7d3f3318f (diff) |
implement fetching and exporting of shared feeds
Diffstat (limited to 'modules/backend-rpc.php')
-rw-r--r-- | modules/backend-rpc.php | 32 |
1 files changed, 0 insertions, 32 deletions
diff --git a/modules/backend-rpc.php b/modules/backend-rpc.php index 2ff9a6312..75ce6886a 100644 --- a/modules/backend-rpc.php +++ b/modules/backend-rpc.php @@ -834,38 +834,6 @@ return; } - if ($subop == "fbExport") { - - // TODO: change to _POST - $access_key = db_escape_string($_REQUEST["key"]); - - // TODO: rate limit checking using last_connected - $result = db_query($link, "SELECT id FROM ttrss_linked_instances - WHERE access_key = '$access_key'"); - - if (db_num_rows($result) == 1) { - - $instance_id = db_fetch_result($result, 0, "id"); - - $result = db_query($link, "SELECT feed_url, title, subscribers - FROM ttrss_feedbrowser_cache ORDER BY subscribers DESC LIMIT 100"); - - $feeds = array(); - - while ($line = db_fetch_assoc($result)) { - array_push($feeds, $line); - } - - db_query($link, "UPDATE ttrss_linked_instances SET last_connected = NOW() - WHERE id = '$instance_id'"); - - print json_encode(array("feeds" => $feeds)); - } else { - print json_encode(array("error" => array("code" => 6))); - } - return; - } - if ($subop == "genHash") { $hash = sha1(uniqid(rand(), true)); |