From: Andrew Dolgov Date: Mon, 29 Aug 2016 03:59:43 +0000 (+0300) Subject: Merge branch 'add_feed_id_to_subscribeToFeed_response' into 'master' X-Git-Tag: 17.1~41 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=733b257d31909624e1e8d28b863b6323b2108dba;hp=557d86fe42e38a43b023b78af782dc509e4581f7;p=tt-rss.git Merge branch 'add_feed_id_to_subscribeToFeed_response' into 'master' Add feed id to subscribe to feed response As described on the forum, this proposed change is to make the subscribeToFeed API response include the feed_id of the new or existing feed. https://tt-rss.org/forum/viewtopic.php?f=8&t=3893 Thank you. John See merge request !35 --- diff --git a/classes/api.php b/classes/api.php index 35c5d5f3..da164aca 100644 --- a/classes/api.php +++ b/classes/api.php @@ -2,7 +2,7 @@ class API extends Handler { - const API_LEVEL = 13; + const API_LEVEL = 14; const STATUS_OK = 0; const STATUS_ERR = 1; diff --git a/include/functions.php b/include/functions.php index 3902ac45..3dea5677 100755 --- a/include/functions.php +++ b/include/functions.php @@ -1772,9 +1772,9 @@ set_basic_feed_info($feed_id); } - return array("code" => 1); + return array("code" => 1, "feed_id" => (int) $feed_id); } else { - return array("code" => 0); + return array("code" => 0, "feed_id" => (int) db_fetch_result($result, 0, "id")); } }