]> git.joonet.de Git - adminer.git/commitdiff
Don't display Load more data on last page
authorJakub Vrana <jakub@vrana.cz>
Mon, 20 Aug 2012 15:25:20 +0000 (08:25 -0700)
committerJakub Vrana <jakub@vrana.cz>
Mon, 20 Aug 2012 15:25:20 +0000 (08:25 -0700)
adminer/select.inc.php

index efc2c0549dcb15cf52d1e611bd12848d1a4f8737..8ad42c8349595891ce2118b15cbc6ae85beb2dc9 100644 (file)
@@ -423,11 +423,10 @@ if (!$columns) {
                                        echo pagination($i, $page);
                                }
                                echo ($page + 5 < $max_page ? " ..." : "") . ($exact_count && $found_rows !== false ? pagination($max_page, $page) : ' <a href="' . h(remove_from_uri("page") . "&page=last") . '">' . lang('last') . "</a>");
-                               if (count($rows) >= $limit) {
-                                       echo ' <a href="' . h(remove_from_uri("page") . "&page=" . ($page + 1)) . '" onclick="return !selectLoadMore(this, ' . (+$limit) . ', \'' . lang('Loading') . '\');">' . lang('Load more data') . '</a>';
-                               }
                        }
-                       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 ? ' <a href="' . h(remove_from_uri("page") . "&page=" . ($page + 1)) . '" onclick="return !selectLoadMore(this, ' . (+$limit) . ', \'' . lang('Loading') . '\');">' . lang('Load more data') . '</a>' : '');
+                       echo " " . checkbox("all", 1, 0, lang('whole result')) . "\n";
                        
                        if ($adminer->selectCommandPrint()) {
                                ?>