queryFeedHeadlines: support start_ts when browsing by tag

This commit is contained in:
Andrew Dolgov 2019-06-18 13:10:32 +03:00
parent 8b9c82f285
commit 270b39a337
1 changed files with 8 additions and 7 deletions

View File

@ -1683,6 +1683,13 @@ class Feeds extends Handler_Protected {
$offset_query_part = ""; $offset_query_part = "";
} }
if ($start_ts) {
$start_ts_formatted = date("Y/m/d H:i:s", strtotime($start_ts));
$start_ts_query_part = "date_entered >= '$start_ts_formatted' AND";
} else {
$start_ts_query_part = "";
}
if (is_numeric($feed)) { if (is_numeric($feed)) {
// proper override_order applied above // proper override_order applied above
if ($vfeed_query_part && !$ignore_vfeed_group && get_pref('VFEED_GROUP_BY_FEED', $owner_uid)) { if ($vfeed_query_part && !$ignore_vfeed_group && get_pref('VFEED_GROUP_BY_FEED', $owner_uid)) {
@ -1706,13 +1713,6 @@ class Feeds extends Handler_Protected {
if ($vfeed_query_part) $vfeed_query_part .= "favicon_avg_color,"; if ($vfeed_query_part) $vfeed_query_part .= "favicon_avg_color,";
if ($start_ts) {
$start_ts_formatted = date("Y/m/d H:i:s", strtotime($start_ts));
$start_ts_query_part = "date_entered >= '$start_ts_formatted' AND";
} else {
$start_ts_query_part = "";
}
$first_id = 0; $first_id = 0;
$first_id_query_strategy_part = $query_strategy_part; $first_id_query_strategy_part = $query_strategy_part;
@ -1845,6 +1845,7 @@ class Feeds extends Handler_Protected {
tag_name = ".$pdo->quote($feed)." AND tag_name = ".$pdo->quote($feed)." AND
$view_query_part $view_query_part
$search_query_part $search_query_part
$start_ts_query_part
$query_strategy_part ORDER BY $order_by $query_strategy_part ORDER BY $order_by
$limit_query_part $offset_query_part"; $limit_query_part $offset_query_part";