From 72bc4b654339a3ad69416b33ce1e1e6d2696674a Mon Sep 17 00:00:00 2001 From: Marc Delisle Date: Fri, 27 May 2011 16:00:40 -0400 Subject: [PATCH] bug #3308476 [interface] "Show all" not persistent after a sort --- ChangeLog | 1 + libraries/display_tbl.lib.php | 12 +++++++++--- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index c7dd43f693..ae9e1d7d95 100644 --- a/ChangeLog +++ b/ChangeLog @@ -11,6 +11,7 @@ - [auth] Fixed error handling for signon auth method. - bug #3276001 [core] Avoid caching of index.php. - bug #3306958 [interface] Unnecessary Details slider +- bug #3308476 [interface] "Show all" not persistent after a sort 3.4.1.0 (2011-05-20) - bug #3301108 [interface] Synchronize and already configured host diff --git a/libraries/display_tbl.lib.php b/libraries/display_tbl.lib.php index 78b4bb6850..fc1fcf2a40 100644 --- a/libraries/display_tbl.lib.php +++ b/libraries/display_tbl.lib.php @@ -445,6 +445,11 @@ function PMA_displayTableHeaders(&$is_display, &$fields_meta, $fields_cnt = 0, $ global $sql_query, $num_rows; global $vertical_display, $highlight_columns; + // required to generate sort links that will remember whether the + // "Show all" button has been clicked + $sql_md5 = md5($GLOBALS['sql_query']); + $session_max_rows = $_SESSION['tmp_user_values']['query'][$sql_md5]['max_rows']; + if ($analyzed_sql == '') { $analyzed_sql = array(); } @@ -820,9 +825,10 @@ function PMA_displayTableHeaders(&$is_display, &$fields_meta, $fields_cnt = 0, $ $sorted_sql_query = $unsorted_sql_query . $sort_order; } $_url_params = array( - 'db' => $db, - 'table' => $table, - 'sql_query' => $sorted_sql_query, + 'db' => $db, + 'table' => $table, + 'sql_query' => $sorted_sql_query, + 'session_max_rows' => $session_max_rows ); $order_url = 'sql.php' . PMA_generate_common_url($_url_params); -- 2.11.4.GIT