]> git.wh0rd.org - tt-rss.git/blobdiff - functions.php
implement workaround for missing autoloaded headlines for adaptive & unread modes...
[tt-rss.git] / functions.php
index 21693c5002ec51bed17b9e47d01d25e2509e1043..7c5916a1aa4a534b2f88208df6eecb9001635184 100644 (file)
 
                $topmost_article_ids = array();
 
-               if (!$offset) {
-                       $offset = 0;
-               }
-
+               if (!$offset) $offset = 0;
                if ($subop == "undefined") $subop = "";
 
                $subop_split = explode(":", $subop);
                        $match_on = "both";
                }
 
-               $real_offset = $offset * $limit;
+               //$real_offset = $offset * $limit;
 
                if ($_REQUEST["debug"]) $timing_info = print_checkpoint("H0", $timing_info);
 
                $qfh_ret = queryFeedHeadlines($link, $feed, $limit, $view_mode, $cat_view,
-                       $search, $search_mode, $match_on, $override_order, $real_offset);
+                       $search, $search_mode, $match_on, $override_order, $offset);
 
                if ($_REQUEST["debug"]) $timing_info = print_checkpoint("H1", $timing_info);
 
 
                if (db_num_rows($result) > 0) {
 
-                       $lnum = $limit*$offset;
+                       $lnum = $offset+1;
 
                        $num_unread = 0;
                        $cur_feed_title = '';
                        }
                }
 
-#              if (!$offset) {
-#                      if ($headlines_count > 0) print "</div>";
-#                      print "</div>";
-#              }
-
-               #print "]]></content>";
-
                return array($topmost_article_ids, $headlines_count, $feed, $disable_cache,
                        $vgroup_last_feed, $reply['content'], $reply['toolbar']);
        }