1
0
mirror of https://github.com/phpmyadmin/phpmyadmin.git synced 2026-10-28 07:41:55 +03:00

Provide Show all button for reasonably small tables

This commit is contained in:
Michal Čihař
2012-02-08 10:02:45 +01:00
parent 8ec7e8587f
commit 9bb5535199
2 changed files with 2 additions and 2 deletions

View File

@@ -346,7 +346,7 @@ function PMA_displayTableNavigation($pos_next, $pos_prev, $sql_query, $id_for_di
} //_if1
// Display the "Show all" button if allowed
if ($GLOBALS['cfg']['ShowAll'] && ($num_rows < $unlim_num_rows)) {
if (($num_rows < $unlim_num_rows) && ($GLOBALS['cfg']['ShowAll'] || ($GLOBALS['cfg']['MaxRows'] * 5 >= $unlim_num_rows))) {
echo "\n";
?>
<td>

View File

@@ -448,7 +448,7 @@ if ($GLOBALS['cfg']['RememberSorting']
}
// Do append a "LIMIT" clause?
if ((! $cfg['ShowAll'] || $_SESSION['tmp_user_values']['max_rows'] != 'all')
if (($_SESSION['tmp_user_values']['max_rows'] != 'all')
&& ! ($is_count || $is_export || $is_func || $is_analyse)
&& isset($analyzed_sql[0]['queryflags']['select_from'])
&& ! isset($analyzed_sql[0]['queryflags']['offset'])