From 68e21b05e46f144735faa849b80734d83812c7e6 Mon Sep 17 00:00:00 2001 From: Madhura Jayaratne Date: Thu, 4 Aug 2011 00:04:16 +0530 Subject: [PATCH] Changelog entry for bug #3383711. Some formatting --- ChangeLog | 1 + libraries/display_tbl.lib.php | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index dbcc2adce..77d630c14 100644 --- a/ChangeLog +++ b/ChangeLog @@ -5,6 +5,7 @@ phpMyAdmin - ChangeLog - bug #3375325 [interface] Page list in navigation frame looks odd - bug #3313235 [interface] Error div misplaced - bug #3374802 [interface] Comment on a column breaks inline editing +- bug #3383711 [display] Order by a column in a view doesn't work in some cases 3.4.4.0 (not yet released) - bug #3323060 [parser] SQL parser breaks AJAX requests if query has unclosed quotes diff --git a/libraries/display_tbl.lib.php b/libraries/display_tbl.lib.php index a27243fc4..3fa26c1f3 100644 --- a/libraries/display_tbl.lib.php +++ b/libraries/display_tbl.lib.php @@ -796,8 +796,9 @@ function PMA_displayTableHeaders(&$is_display, &$fields_meta, $fields_cnt = 0, $ // 2.1.3 Check the field name for a bracket. // If it contains one, it's probably a function column // like 'COUNT(`field`)' - // This check is not sufficient, see bug #3383711, it still might be a column name of a view, check is_orgname - if (strpos($name_to_use_in_sort, '(') !== false && !$is_orgname) { + // It still might be a column name of a view. See bug #3383711 + // Check is_orgname. + if (strpos($name_to_use_in_sort, '(') !== false && ! $is_orgname) { $sort_order = ' ORDER BY ' . $name_to_use_in_sort . ' '; } else { $sort_order = ' ORDER BY ' . $sort_tbl . PMA_backquote($name_to_use_in_sort) . ' ';