From 1a740cf68ec8bf8e7bdf132013727ca89497dbef Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Mon, 6 Feb 2012 14:32:30 +0400 Subject: [PATCH] api: limit getHeadlines output to 60 headlines --- classes/api.php | 3 +++ 1 file changed, 3 insertions(+) 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"]); -- 2.39.5