From: Andrew Dolgov Date: Mon, 6 Feb 2012 10:32:30 +0000 (+0400) Subject: api: limit getHeadlines output to 60 headlines X-Git-Tag: 1.5.10~10 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=1a740cf68ec8bf8e7bdf132013727ca89497dbef;p=tt-rss.git api: limit getHeadlines output to 60 headlines --- diff --git a/classes/api.php b/classes/api.php index cd140172..1a79ffe2 100644 --- a/classes/api.php +++ b/classes/api.php @@ -160,6 +160,9 @@ class API extends Handler { if ($feed_id != "") { $limit = (int)db_escape_string($_REQUEST["limit"]); + + if (!$limit || $limit >= 60) $limit = 60; + $offset = (int)db_escape_string($_REQUEST["skip"]); $filter = db_escape_string($_REQUEST["filter"]); $is_cat = (bool)db_escape_string($_REQUEST["is_cat"]);