From 57e72b0541892d6be3537c9124af9b84e2b10fc6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20=C4=8Ciha=C5=99?= Date: Tue, 13 May 2003 13:27:17 +0000 Subject: [PATCH] Fix eporting without backquotes (bug #737023). --- ChangeLog | 2 ++ libraries/build_dump.lib.php3 | 8 ++++---- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 92652be15..4d2898c45 100755 --- a/ChangeLog +++ b/ChangeLog @@ -34,6 +34,8 @@ $Source$ * tbl_replace.php3: Display message after updating row. * libraries/common.lib.php3: Fix tab attributes when some specified as parameters. + * libraries/build_dump.lib.php3: Fix eporting without backquotes (bug + #737023). 2003-05-12 Garvin Hicking * queryframe.php3: Remove left/bottom margin to better fit the link title diff --git a/libraries/build_dump.lib.php3 b/libraries/build_dump.lib.php3 index 6296211cf..e91925d87 100644 --- a/libraries/build_dump.lib.php3 +++ b/libraries/build_dump.lib.php3 @@ -26,11 +26,11 @@ if (!defined('PMA_BUILD_DUMP_LIB_INCLUDED')){ * This function exists because mysql_field_type() returns 'blob' * even for 'text' fields. */ - function PMA_fieldTypes($db, $table) { + function PMA_fieldTypes($db, $table,$use_backquotes) { PMA_mysql_select_db($db); $table_def = PMA_mysql_query('SHOW FIELDS FROM ' . PMA_backquote($table)); while($row = @PMA_mysql_fetch_array($table_def)) { - $types[PMA_backquote($row['Field'])] = ereg_replace('\\(.*', '', $row['Type']); + $types[PMA_backquote($row['Field'],$use_backquotes)] = ereg_replace('\\(.*', '', $row['Type']); } return $types; } @@ -274,7 +274,7 @@ if (!defined('PMA_BUILD_DUMP_LIB_INCLUDED')){ // get the real types of the table's fields (in an array) // the key of the array is the backquoted field name - $field_types = PMA_fieldTypes($db,$table); + $field_types = PMA_fieldTypes($db,$table,$use_backquotes); // Checks whether the field is an integer or not for ($j = 0; $j < $fields_cnt; $j++) { @@ -452,7 +452,7 @@ if (!defined('PMA_BUILD_DUMP_LIB_INCLUDED')){ // get the real types of the table's fields (in an array) // the key of the array is the backquoted field name - $field_types = PMA_fieldTypes($db,$table); + $field_types = PMA_fieldTypes($db,$table,$use_backquotes); for ($j = 0; $j < $fields_cnt; $j++) { if (!isset($row[$j])) {