Merge remote-tracking branch 'origin/master'

This commit is contained in:
Michal Čihař 2012-03-26 19:25:14 +02:00
commit 3353c421b1

View File

@ -926,9 +926,20 @@ function PMA_displayTableHeaders(&$is_display, &$fields_meta, $fields_cnt = 0, $
&& strpos($sort_expression_nodirection, $sort_tbl) === false
&& strpos($sort_expression_nodirection, '(') === false
) {
$sort_expression_nodirection = $sort_tbl . $sort_expression_nodirection;
$new_sort_expression_nodirection = $sort_tbl . $sort_expression_nodirection;
} else {
$new_sort_expression_nodirection = $sort_expression_nodirection;
}
$is_in_sort = false;
$sort_name = str_replace('`', '', $sort_tbl) . $name_to_use_in_sort;
if (
$sort_name == str_replace('`', '', $new_sort_expression_nodirection)
||
$sort_name == str_replace('`', '', $sort_expression_nodirection)
) {
$is_in_sort = true;
}
$is_in_sort = (str_replace('`', '', $sort_tbl) . $name_to_use_in_sort == str_replace('`', '', $sort_expression_nodirection) ? true : false);
}
// 2.1.3 Check the field name for a bracket.
// If it contains one, it's probably a function column