api: add updateFeed

This commit is contained in:
Andrew Dolgov 2009-12-16 16:48:49 +03:00
parent d960219b0f
commit cc3744354b
1 changed files with 14 additions and 0 deletions

View File

@ -341,6 +341,20 @@
break; 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": case "getPref":
$pref_name = db_escape_string($_REQUEST["pref_name"]); $pref_name = db_escape_string($_REQUEST["pref_name"]);
print json_encode(array("value" => get_pref($link, $pref_name))); print json_encode(array("value" => get_pref($link, $pref_name)));