mirror of
https://git.tt-rss.org/git/tt-rss.git
synced 2025-12-19 08:41:29 +00:00
disable page navigation when limit == 0
This commit is contained in:
@@ -406,7 +406,8 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
print_headline_subtoolbar($link, $feed_site_url, $feed_title, false,
|
print_headline_subtoolbar($link, $feed_site_url, $feed_title, false,
|
||||||
$rtl_content, $feed, $cat_view, $search, $match_on, $search_mode, $offset);
|
$rtl_content, $feed, $cat_view, $search, $match_on, $search_mode,
|
||||||
|
$offset, $limit);
|
||||||
|
|
||||||
print "<div id=\"headlinesInnerContainer\">";
|
print "<div id=\"headlinesInnerContainer\">";
|
||||||
|
|
||||||
|
|||||||
@@ -2380,6 +2380,10 @@
|
|||||||
|
|
||||||
$content_query_part = "content as content_preview,";
|
$content_query_part = "content as content_preview,";
|
||||||
|
|
||||||
|
if ($limit_query_part) {
|
||||||
|
$offset_query_part = "OFFSET $offset";
|
||||||
|
}
|
||||||
|
|
||||||
$query = "SELECT
|
$query = "SELECT
|
||||||
guid,
|
guid,
|
||||||
ttrss_entries.id,ttrss_entries.title,
|
ttrss_entries.id,ttrss_entries.title,
|
||||||
@@ -2400,7 +2404,7 @@
|
|||||||
$search_query_part
|
$search_query_part
|
||||||
$view_query_part
|
$view_query_part
|
||||||
$query_strategy_part ORDER BY $order_by
|
$query_strategy_part ORDER BY $order_by
|
||||||
$limit_query_part OFFSET $offset";
|
$limit_query_part $offset_query_part";
|
||||||
|
|
||||||
$result = db_query($link, $query);
|
$result = db_query($link, $query);
|
||||||
|
|
||||||
@@ -2710,7 +2714,7 @@
|
|||||||
function print_headline_subtoolbar($link, $feed_site_url, $feed_title,
|
function print_headline_subtoolbar($link, $feed_site_url, $feed_title,
|
||||||
$bottom = false, $rtl_content = false, $feed_id = 0,
|
$bottom = false, $rtl_content = false, $feed_id = 0,
|
||||||
$is_cat = false, $search = false, $match_on = false,
|
$is_cat = false, $search = false, $match_on = false,
|
||||||
$search_mode = false, $offset = 0) {
|
$search_mode = false, $offset = 0, $limit = 0) {
|
||||||
|
|
||||||
$user_page_offset = $offset + 1;
|
$user_page_offset = $offset + 1;
|
||||||
|
|
||||||
@@ -2779,13 +2783,17 @@
|
|||||||
<!-- <li class=\"top2\">
|
<!-- <li class=\"top2\">
|
||||||
Page:
|
Page:
|
||||||
<a href=\"$page_prev_link\">Previous</a>,
|
<a href=\"$page_prev_link\">Previous</a>,
|
||||||
<a href=\"$page_next_link\">Next</a></li> -->
|
<a href=\"$page_next_link\">Next</a></li> -->";
|
||||||
|
|
||||||
|
if ($limit != 0) {
|
||||||
|
print "
|
||||||
<li class=\"top\"><a href=\"$page_next_link\">Next page</a><ul>
|
<li class=\"top\"><a href=\"$page_next_link\">Next page</a><ul>
|
||||||
<li onclick=\"$page_prev_link\">Previous page</li>
|
<li onclick=\"$page_prev_link\">Previous page</li>
|
||||||
<li onclick=\"$page_first_link\">First page</li></ul></li>
|
<li onclick=\"$page_first_link\">First page</li></ul></li>
|
||||||
</ul>
|
</ul>";
|
||||||
|
}
|
||||||
|
|
||||||
|
print "
|
||||||
</td>";
|
</td>";
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user