diff --git a/adminer/select.inc.php b/adminer/select.inc.php index 1c4f5bdf..92771ff5 100644 --- a/adminer/select.inc.php +++ b/adminer/select.inc.php @@ -137,7 +137,7 @@ if ($_POST && !$error) { $message = lang('Item%s has been inserted.', " $last_id"); } } - queries_redirect(remove_from_uri("page"), $message, $result); + queries_redirect(remove_from_uri(), $message, $result); //! display edit page in case of an error } elseif (!$_POST["import"]) { // modify if (!$_POST["val"]) { @@ -434,7 +434,7 @@ if (!$columns) { } } echo "

"; - if (+$limit && ($found_rows === false || $found_rows > $limit)) { + if (+$limit && ($found_rows === false || $found_rows > $limit || $page)) { // display first, previous 4, next 4 and last page $max_page = ($found_rows === false ? $page + (count($rows) >= $limit ? 2 : 1) @@ -445,7 +445,9 @@ if (!$columns) { for ($i = max(1, $page - 4); $i < min($max_page, $page + 5); $i++) { echo pagination($i, $page); } - echo ($page + 5 < $max_page ? " ..." : "") . ($exact_count && $found_rows !== false ? pagination($max_page, $page) : ' ' . lang('last') . ""); + if ($max_page > 0) { + echo ($page + 5 < $max_page ? " ..." : "") . ($exact_count && $found_rows !== false ? pagination($max_page, $page) : ' ' . lang('last') . ""); + } } 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') . '' : ''); diff --git a/changes.txt b/changes.txt index 909c4bdf..a249669a 100644 --- a/changes.txt +++ b/changes.txt @@ -3,6 +3,7 @@ Display select SQL edit form inline Compatibility with MySQL 5.6 Recover original view, trigger, routine if creating fails Allow loading more data with inline edit (bug #3605531) +Stay on the same page after deleting rows (bug #3605845) Disable autocapitalize in identifiers Indeterminate state of select all checkboxes