From cc3744354b70a2ee3c152a277b2ae649d0cf565e Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Wed, 16 Dec 2009 16:48:49 +0300 Subject: [PATCH] api: add updateFeed --- api/index.php | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/api/index.php b/api/index.php index 6126c362..b4f96764 100644 --- a/api/index.php +++ b/api/index.php @@ -341,6 +341,20 @@ break; + case "updateFeed": + $feed_id = db_escape_string($_REQUEST["feed_id"]); + + $result = db_query($link, + "SELECT feed_url FROM ttrss_feeds WHERE id = '$feed_id' + AND owner_uid = " . $_SESSION["uid"]); + + if (db_num_rows($result) > 0) { + $feed_url = db_fetch_result($result, 0, "feed_url"); + update_rss_feed($link, $feed_url, $feed_id); + } + + break; + case "getPref": $pref_name = db_escape_string($_REQUEST["pref_name"]); print json_encode(array("value" => get_pref($link, $pref_name))); -- 2.39.5