Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Redundant pagination, mysql 5.7+ issue #140

Merged
merged 1 commit into from
Apr 8, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
- Make sql log file name configurable [\#130](https://github.com/torrentpier/torrentpier-lts/pull/130) ([belomaxorka](https://github.com/belomaxorka))
- Enhanced https check [\#131](https://github.com/torrentpier/torrentpier-lts/pull/131), [\#132](https://github.com/torrentpier/torrentpier-lts/pull/132) ([belomaxorka](https://github.com/belomaxorka))
- Added ability to configure sphinx debug [\#137](https://github.com/torrentpier/torrentpier-lts/pull/137) ([belomaxorka](https://github.com/belomaxorka))
- Redundant pagination, mysql 5.7+ issue [\#140](https://github.com/torrentpier/torrentpier-lts/pull/140) ([belomaxorka](https://github.com/belomaxorka))
- Minor fixes [\#124](https://github.com/torrentpier/torrentpier-lts/pull/124), [\#133](https://github.com/torrentpier/torrentpier-lts/pull/133), [\#135](https://github.com/torrentpier/torrentpier-lts/pull/135), [\#136](https://github.com/torrentpier/torrentpier-lts/pull/136), [\#139](https://github.com/torrentpier/torrentpier-lts/pull/139) ([belomaxorka](https://github.com/belomaxorka))

## [v2.1.5-2023.03](https://github.com/torrentpier/torrentpier-lts/tree/v2.1.5-2023.03) (2023-04-04)
Expand Down
2 changes: 1 addition & 1 deletion admin/admin_attach_cp.php
Original file line number Diff line number Diff line change
Expand Up @@ -550,7 +550,7 @@
// Generate Pagination
if ($do_pagination && $total_rows > $bb_cfg['topics_per_page'])
{
generate_pagination('admin_attach_cp.php?view=' . $view . '&mode=' . $mode . '&order=' . $sort_order . '&uid=' . $uid, $total_rows, $bb_cfg['topics_per_page'], $start).' ';
generate_pagination('admin_attach_cp.php?view=' . $view . '&mode=' . $mode . '&order=' . $sort_order . '&uid=' . $uid, $total_rows, $bb_cfg['topics_per_page'], $start);
}

print_page('admin_attach_cp.tpl', 'admin');
2 changes: 1 addition & 1 deletion library/includes/ucp/viewtorrent.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
AND tor.topic_id = t.topic_id
AND t.forum_id = f.forum_id
$not_auth_forums_sql
GROUP BY tr.topic_id
GROUP BY tr.topic_id, tr.peer_hash
ORDER BY f.forum_name, t.topic_title
");

Expand Down
4 changes: 2 additions & 2 deletions memberlist.php
Original file line number Diff line number Diff line change
Expand Up @@ -223,15 +223,15 @@
if ( $mode != 'topten' || $bb_cfg['topics_per_page'] < 10 )
{
$sql = "SELECT COUNT(*) AS total FROM ". BB_USERS;
$sql .= ($letter_sql) ? " WHERE $letter_sql" : '';
$sql .= ($letter_sql) ? " WHERE $letter_sql" : " WHERE user_id NOT IN(". EXCLUDED_USERS_CSV .")";
if (!$result = DB()->sql_query($sql))
{
bb_die('Error getting total users');
}
if ($total = DB()->sql_fetchrow($result))
{
$total_members = $total['total'];
generate_pagination($paginationurl, $total_members, $bb_cfg['topics_per_page'], $start). '&nbsp;';
generate_pagination($paginationurl, $total_members, $bb_cfg['topics_per_page'], $start);
}
DB()->sql_freeresult($result);
}
Expand Down