From: Jakub Vrana Date: Mon, 20 Aug 2012 15:25:20 +0000 (-0700) Subject: Don't display Load more data on last page X-Git-Tag: v3.6.0~40 X-Git-Url: https://git.joonet.de/?a=commitdiff_plain;h=68211ac42bc3fc96e455e0780b1a9e31982e5afd;p=adminer.git Don't display Load more data on last page --- diff --git a/adminer/select.inc.php b/adminer/select.inc.php index efc2c054..8ad42c83 100644 --- a/adminer/select.inc.php +++ b/adminer/select.inc.php @@ -423,11 +423,10 @@ if (!$columns) { echo pagination($i, $page); } echo ($page + 5 < $max_page ? " ..." : "") . ($exact_count && $found_rows !== false ? pagination($max_page, $page) : ' ' . lang('last') . ""); - if (count($rows) >= $limit) { - echo ' ' . lang('Load more data') . ''; - } } - echo ($found_rows !== false ? " (" . ($exact_count ? "" : "~ ") . lang('%d row(s)', $found_rows) . ")" : "") . " " . checkbox("all", 1, 0, lang('whole result')) . "\n"; + echo ($found_rows !== false ? " (" . ($exact_count ? "" : "~ ") . lang('%d row(s)', $found_rows) . ")" : ""); + echo (+$limit && ($found_rows === false ? count($rows) + 1 : $found_rows - $page * $limit) > $limit ? ' ' . lang('Load more data') . '' : ''); + echo " " . checkbox("all", 1, 0, lang('whole result')) . "\n"; if ($adminer->selectCommandPrint()) { ?>