Don't count rows if we reached the end
This commit is contained in:
parent
09920e0056
commit
fa41126c37
|
@ -445,8 +445,8 @@ if (!$columns && support("table")) {
|
||||||
if (($rows || $page) && !is_ajax()) {
|
if (($rows || $page) && !is_ajax()) {
|
||||||
$exact_count = true;
|
$exact_count = true;
|
||||||
if ($_GET["page"] != "last") {
|
if ($_GET["page"] != "last") {
|
||||||
if ($limit == "") {
|
if ($limit == "" || (count($rows) < $limit && ($rows || !$page))) {
|
||||||
$found_rows = count($rows);
|
$found_rows = ($page ? $page * $limit : 0) + count($rows);
|
||||||
} elseif ($jush != "sql" || !$is_group) {
|
} elseif ($jush != "sql" || !$is_group) {
|
||||||
$found_rows = ($is_group ? false : found_rows($table_status, $where));
|
$found_rows = ($is_group ? false : found_rows($table_status, $where));
|
||||||
if ($found_rows < max(1e4, 2 * ($page + 1) * $limit)) {
|
if ($found_rows < max(1e4, 2 * ($page + 1) * $limit)) {
|
||||||
|
|
Loading…
Reference in a new issue