]> git.wh0rd.org Git - tt-rss.git/commitdiff
generated feeds: add offset=
authorAndrew Dolgov <fox@madoka.volgo-balt.ru>
Mon, 15 Oct 2012 06:34:53 +0000 (10:34 +0400)
committerAndrew Dolgov <fox@madoka.volgo-balt.ru>
Mon, 15 Oct 2012 06:34:53 +0000 (10:34 +0400)
classes/handler/public.php

index 7cb465594b4f2d343a07ae0cbd14720d31c2d4c3..e5c543b304cb18e583768445cbe50eca20cc1e16 100644 (file)
@@ -2,7 +2,8 @@
 class Handler_Public extends Handler {
 
        private function generate_syndicated_feed($owner_uid, $feed, $is_cat,
-               $limit, $search, $search_mode, $match_on, $view_mode = false, $format = 'atom') {
+               $limit, $offset, $search, $search_mode, $match_on,
+               $view_mode = false, $format = 'atom') {
 
                require_once "lib/MiniTemplator.class.php";
 
@@ -21,7 +22,7 @@ class Handler_Public extends Handler {
 
                $qfh_ret = queryFeedHeadlines($this->link, $feed,
                        $limit, $view_mode, $is_cat, $search, $search_mode,
-                       $match_on, "$date_sort_field DESC", 0, $owner_uid);
+                       $match_on, "$date_sort_field DESC", $offset, $owner_uid);
 
                $result = $qfh_ret[0];
                $feed_title = htmlspecialchars($qfh_ret[1]);
@@ -333,6 +334,7 @@ class Handler_Public extends Handler {
                $key = db_escape_string($_REQUEST["key"]);
                $is_cat = $_REQUEST["is_cat"] != false;
                $limit = (int)db_escape_string($_REQUEST["limit"]);
+               $offset = (int)db_escape_string($_REQUEST["offset"]);
 
                $search = db_escape_string($_REQUEST["q"]);
                $match_on = db_escape_string($_REQUEST["m"]);
@@ -359,7 +361,7 @@ class Handler_Public extends Handler {
 
                if ($owner_id) {
                        $this->generate_syndicated_feed($owner_id, $feed, $is_cat, $limit,
-                               $search, $search_mode, $match_on, $view_mode, $format);
+                               $offset, $search, $search_mode, $match_on, $view_mode, $format);
                } else {
                        header('HTTP/1.1 403 Forbidden');
                }