1
0
mirror of https://git.tt-rss.org/git/tt-rss.git synced 2025-12-13 23:05:56 +00:00

query feed headlines: fix limit/offset

This commit is contained in:
Andrew Dolgov
2017-12-01 21:07:55 +03:00
parent cb13089af1
commit 7fc303e6ab

View File

@@ -1869,7 +1869,7 @@ class Feeds extends Handler_Protected {
} }
if ($limit > 0) { if ($limit > 0) {
$limit_query_part = "LIMIT " . $pdo->quote($limit); $limit_query_part = "LIMIT " . (int)$limit;
} }
$allow_archived = false; $allow_archived = false;
@@ -2027,7 +2027,7 @@ class Feeds extends Handler_Protected {
$content_query_part = "content, "; $content_query_part = "content, ";
if ($limit_query_part) { if ($limit_query_part) {
$offset_query_part = "OFFSET " . $pdo->quote($offset); $offset_query_part = "OFFSET " . (int)$offset;
} else { } else {
$offset_query_part = ""; $offset_query_part = "";
} }