From: Andrew Dolgov Date: Fri, 18 Dec 2009 12:08:38 +0000 (+0300) Subject: mobile: implement pagination for headlines X-Git-Tag: 1.4.0~158 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=78d7a965591bdc9d70ef2275b310940b4d58fc52;p=tt-rss.git mobile: implement pagination for headlines --- diff --git a/mobile/feed.php b/mobile/feed.php index 610dd6ad..02461b3f 100644 --- a/mobile/feed.php +++ b/mobile/feed.php @@ -22,7 +22,8 @@ $feed_id = db_escape_string($_REQUEST["id"]); $cat_id = db_escape_string($_REQUEST["cat"]); + $offset = (int) db_escape_string($_REQUEST["skip"]); - render_headlines_list($link, $feed_id, $cat_id); + render_headlines_list($link, $feed_id, $cat_id, $offset); ?> diff --git a/mobile/functions.php b/mobile/functions.php index 20accdc5..4880e1f5 100644 --- a/mobile/functions.php +++ b/mobile/functions.php @@ -284,10 +284,10 @@ print ""; } - function render_headlines_list($link, $feed_id, $cat_id) { + function render_headlines_list($link, $feed_id, $cat_id, $offset) { $feed_id = $feed_id; - $limit = 30; + $limit = 15; $filter = ''; $is_cat = false; $view_mode = 'adaptive'; @@ -297,23 +297,27 @@ $search = ''; $search_mode = ''; $match_on = ''; - + $qfh_ret = queryFeedHeadlines($link, $feed_id, $limit, - $view_mode, $is_cat, $search, $search_mode, $match_on); + $view_mode, $is_cat, $search, $search_mode, $match_on, false, $offset); $result = $qfh_ret[0]; $feed_title = $qfh_ret[1]; - if ($cat_id) { - $cat_title = getCategoryTitle($link, $cat_id); + if (!$offset) { + if ($cat_id) { + $cat_title = getCategoryTitle($link, $cat_id); - print "