From 854a65a901e473fbc7edce8e470b8dbe7458707e Mon Sep 17 00:00:00 2001 From: Marc Delisle Date: Mon, 25 Feb 2008 17:59:13 +0000 Subject: [PATCH] bug #1901502 Sort data on a field name with space --- libraries/display_tbl.lib.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/libraries/display_tbl.lib.php b/libraries/display_tbl.lib.php index a4229bfac..de8d46acd 100644 --- a/libraries/display_tbl.lib.php +++ b/libraries/display_tbl.lib.php @@ -759,9 +759,8 @@ function PMA_displayTableHeaders(&$is_display, &$fields_meta, $fields_cnt = 0, $ } // $name_to_use_in_sort might contain a space due to // formatting of function expressions like "COUNT(name )" - // so we remove spaces; this might cause problems with spaces - // inside a column name. - $name_to_use_in_sort = str_replace(' ', '', $name_to_use_in_sort); + // so we remove the space in this situation + $name_to_use_in_sort = str_replace(' )', ')', $name_to_use_in_sort); if (empty($sort_expression)) { $is_in_sort = false;