bug #1235473 display_tbl.lib.php Undefined variable order_img

This commit is contained in:
Marc Delisle
2005-07-10 11:36:53 +00:00
parent 5712184a31
commit 55b30c9533
2 changed files with 9 additions and 2 deletions

View File

@@ -5,6 +5,10 @@ phpMyAdmin - Changelog
$Id$ $Id$
$Source$ $Source$
2005-07-10 Marc Delisle <lem9@users.sourceforge.net>
* libraries/display_tbl.lib.php: bug #1235473 display_tbl.lib.php,
Undefined variable order_img
2005-07-06 Marc Delisle <lem9@users.sourceforge.net> 2005-07-06 Marc Delisle <lem9@users.sourceforge.net>
* db_search.php: bug #1233349, db search in MySQL 5.0.x on fields * db_search.php: bug #1233349, db search in MySQL 5.0.x on fields
without a charset without a charset

View File

@@ -760,14 +760,12 @@ function PMA_displayTableHeaders(&$is_display, &$fields_meta, $fields_cnt = 0, $
// FROM `PMA_relation` AS `1` , `PMA_relation` AS `2` // FROM `PMA_relation` AS `1` , `PMA_relation` AS `2`
if (($is_join if (($is_join
//&& !preg_match('~([^[:space:],]|`[^`]`)[[:space:]]+(as[[:space:]]+)?' . $fields_meta[$i]->name . '~i', $select_stt[1], $parts))
&& !preg_match('~([^[:space:],]|`[^`]`)[[:space:]]+(as[[:space:]]+)?' . $fields_meta[$i]->name . '~i', $select_expr, $parts)) && !preg_match('~([^[:space:],]|`[^`]`)[[:space:]]+(as[[:space:]]+)?' . $fields_meta[$i]->name . '~i', $select_expr, $parts))
|| ( isset($analyzed_sql[0]['select_expr'][$i]['expr']) || ( isset($analyzed_sql[0]['select_expr'][$i]['expr'])
&& isset($analyzed_sql[0]['select_expr'][$i]['column']) && isset($analyzed_sql[0]['select_expr'][$i]['column'])
&& $analyzed_sql[0]['select_expr'][$i]['expr'] != && $analyzed_sql[0]['select_expr'][$i]['expr'] !=
$analyzed_sql[0]['select_expr'][$i]['column'] $analyzed_sql[0]['select_expr'][$i]['column']
&& !empty($fields_meta[$i]->table)) ) { && !empty($fields_meta[$i]->table)) ) {
//$sort_tbl = PMA_backquote($fields_meta[$i]->table) . '.';
$sort_tbl = PMA_backquote($fields_meta[$i]->table) . ' . '; $sort_tbl = PMA_backquote($fields_meta[$i]->table) . ' . ';
} else { } else {
$sort_tbl = ''; $sort_tbl = '';
@@ -793,6 +791,7 @@ function PMA_displayTableHeaders(&$is_display, &$fields_meta, $fields_cnt = 0, $
} else { } else {
$sort_order = ' ORDER BY ' . $sort_tbl . PMA_backquote($fields_meta[$i]->name) . ' '; $sort_order = ' ORDER BY ' . $sort_tbl . PMA_backquote($fields_meta[$i]->name) . ' ';
} }
// 2.1.4 Do define the sorting url // 2.1.4 Do define the sorting url
if (!$is_in_sort) { if (!$is_in_sort) {
// loic1: patch #455484 ("Smart" order) // loic1: patch #455484 ("Smart" order)
@@ -810,7 +809,11 @@ function PMA_displayTableHeaders(&$is_display, &$fields_meta, $fields_cnt = 0, $
else if (preg_match('@[[:space:]]DESC$@i', $sort_expression)) { else if (preg_match('@[[:space:]]DESC$@i', $sort_expression)) {
$sort_order .= ' ASC'; $sort_order .= ' ASC';
$order_img = '&nbsp;<img src="' . $GLOBALS['pmaThemeImage'] . 's_desc.png" border="0" width="11" height="9" alt="'. $GLOBALS['strDescending'] . '" title="'. $GLOBALS['strDescending'] . '" id="soimg' . $i . '" />'; $order_img = '&nbsp;<img src="' . $GLOBALS['pmaThemeImage'] . 's_desc.png" border="0" width="11" height="9" alt="'. $GLOBALS['strDescending'] . '" title="'. $GLOBALS['strDescending'] . '" id="soimg' . $i . '" />';
} else {
$sort_order .= ' DESC';
$order_img = '&nbsp;<img src="' . $GLOBALS['pmaThemeImage'] . 's_asc.png" border="0" width="11" height="9" alt="'. $GLOBALS['strAscending'] . '" title="'. $GLOBALS['strAscending'] . '" id="soimg' . $i . '" />';
} }
if (preg_match('@(.*)([[:space:]](LIMIT (.*)|PROCEDURE (.*)|FOR UPDATE|LOCK IN SHARE MODE))@i', $unsorted_sql_query, $regs3)) { if (preg_match('@(.*)([[:space:]](LIMIT (.*)|PROCEDURE (.*)|FOR UPDATE|LOCK IN SHARE MODE))@i', $unsorted_sql_query, $regs3)) {
$sorted_sql_query = $regs3[1] . $sort_order . $regs3[2]; $sorted_sql_query = $regs3[1] . $sort_order . $regs3[2];
} else { } else {