From 6b8d74cb880f34ba809356920b880e68ec82cbd9 Mon Sep 17 00:00:00 2001 From: Marc Delisle Date: Fri, 22 Jun 2007 19:17:56 +0000 Subject: [PATCH] bug #1729027 Sorting results of VIEW browsing --- ChangeLog | 1 + libraries/display_tbl.lib.php | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index db34253e2..eb0e085bb 100644 --- a/ChangeLog +++ b/ChangeLog @@ -9,6 +9,7 @@ $HeadURL$ - bug #1734285 Copy database with VIEWs - bug #1722502 DROP TABLE in export VIEW +- bug #1729027 Sorting results of VIEW browsing 2.10.2.0 (2007-06-15) diff --git a/libraries/display_tbl.lib.php b/libraries/display_tbl.lib.php index 96b189ad3..e6880004d 100644 --- a/libraries/display_tbl.lib.php +++ b/libraries/display_tbl.lib.php @@ -173,7 +173,11 @@ function PMA_setDisplayMode(&$the_disp_mode, &$the_total) // false if ($do_display['nav_bar'] == '1' || $do_display['sort_lnk'] == '1') { - if (isset($unlim_num_rows) && $unlim_num_rows < 2) { + // - Do not display sort links if less than 2 rows. + // - For a VIEW we (probably) did not count the number of rows + // so don't test this number here, it would remove the possibility + // of sorting VIEW results. + if (isset($unlim_num_rows) && $unlim_num_rows < 2 && ! PMA_Table::isView($db, $table)) { // garvin: force display of navbar for vertical/horizontal display-choice. // $do_display['nav_bar'] = (string) '0'; $do_display['sort_lnk'] = (string) '0';