]> git.wh0rd.org Git - tt-rss.git/commitdiff
queryfeedheadlines: remove disable_offsets hack
authorAndrew Dolgov <noreply@madoka.volgo-balt.ru>
Tue, 15 Sep 2015 09:33:58 +0000 (12:33 +0300)
committerAndrew Dolgov <noreply@madoka.volgo-balt.ru>
Tue, 15 Sep 2015 09:33:58 +0000 (12:33 +0300)
classes/api.php
include/functions2.php

index 2d420e5278095846a2cbb1ace2759a2430bc6695..08c1846d2ad8353b9e8f16282fa6d62229cdeeea 100644 (file)
@@ -686,8 +686,7 @@ class API extends Handler {
                                "offset" => $offset,
                                "since_id" => $since_id,
                                "include_children" => $include_nested,
-                               "check_first_id" => $check_first_id,
-                               "api_request" => true
+                               "check_first_id" => $check_first_id
                        );
 
                        $qfh_ret = queryFeedHeadlines($params);
index fb8a6a3d0b4ca50e27b0972a7296d8fa82e68538..bd1f9b86066b33027df3f51b649cff9f9a7c0a3b 100644 (file)
                $override_vfeed = isset($params["override_vfeed"]) ? $params["override_vfeed"] : false;
                $start_ts = isset($params["start_ts"]) ? $params["start_ts"] : false;
                $check_first_id = isset($params["check_first_id"]) ? $params["check_first_id"] : false;
-               $api_request = isset($params["api_request"]) ? $params["api_request"] : false;
 
                $ext_tables_part = "";
                $query_strategy_part = "";
                        }
 
                        $view_query_part = "";
-                       $disable_offsets = false;
 
                        if ($view_mode == "adaptive") {
                                if ($search) {
 
                                        if ($unread > 0) {
                                                $view_query_part = " unread = true AND ";
-                                               $disable_offsets = !$api_request && get_pref("CDM_AUTO_CATCHUP") && get_pref("CDM_EXPANDED");
                                        }
                                }
                        }
 
                        if ($view_mode == "unread" && $feed != -6) {
                                $view_query_part = " unread = true AND ";
-                               $disable_offsets = !$api_request && get_pref("CDM_AUTO_CATCHUP") && get_pref("CDM_EXPANDED");
                        }
 
                        if ($limit > 0) {
                                        $sanity_interval_qpart = "date_entered >= DATE_SUB(NOW(), INTERVAL 1 hour) AND";
                                }
 
-                               if (!$search && !$disable_offsets) {
+                               if (!$search) {
                                        // if previous topmost article id changed that means our current pagination is no longer valid
                                        $query = "SELECT DISTINCT
                                                        ttrss_feeds.title,
                                        }
                                }
 
-                               if ($disable_offsets) {
-                                       $offset_query_part = "";
-                               }
-
                                $query = "SELECT DISTINCT
                                                date_entered,
                                                guid,