Fix bug#4807

Don't add `.` if table name is not set when trying to get column in
sort expression.

Signed-off-by: Nisarg Jhaveri <nisargjhaveri@gmail.com>
This commit is contained in:
Nisarg Jhaveri 2015-03-16 19:04:42 +05:30
parent 12e8654df0
commit e12582acdb

View File

@ -2022,7 +2022,10 @@ class PMA_DisplayResults
if (/*overload*/mb_strpos($name_to_use_in_sort, '(') !== false) {
$sort_order .= $query_head . $name_to_use_in_sort . ' ' ;
} else {
$sort_order .= $query_head . $sort_tbl_new . "."
if (/*overload*/mb_strlen($sort_tbl_new) > 0) {
$sort_tbl_new .= ".";
}
$sort_order .= $query_head . $sort_tbl_new
. PMA_Util::backquote(
$name_to_use_in_sort
) . ' ' ;