]> git.wh0rd.org Git - tt-rss.git/commitdiff
api: limit getHeadlines output to 60 headlines
authorAndrew Dolgov <fox@madoka.volgo-balt.ru>
Mon, 6 Feb 2012 10:32:30 +0000 (14:32 +0400)
committerAndrew Dolgov <fox@madoka.volgo-balt.ru>
Mon, 6 Feb 2012 10:32:30 +0000 (14:32 +0400)
classes/api.php

index cd140172c480468665dc89ecf7d82a10214ccbbd..1a79ffe2d6c827aa8be1ee2ea7edc88febe48179 100644 (file)
@@ -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"]);