fixed a php error if there is no 'enclosed by' character

This commit is contained in:
Loïc Chapeaux
2002-01-03 14:38:04 +00:00
parent 772ad8c5ea
commit 2d4592a2ec
2 changed files with 10 additions and 4 deletions

View File

@@ -6,6 +6,8 @@ $Id$
$Source$
2001-01-03 Lo<4C>c Chapeaux <lolo@phpheaven.net>
* libraries/build_dump.php3, lines 508-514: fixed a php error if there is
no "enclosed by" character.
* db_details.php3, line 708; tbl_properties.inc.php3, line 71: maximum
table and field size is 64 characters. Suggested by
Marc Weidner <gurmbot at users.sourceforge.net>.

View File

@@ -503,11 +503,15 @@ if (!defined('PMA_BUILD_DUMP_LIB_INCLUDED')){
else if ($row[$j] == '0' || $row[$j] != '') {
// loic1 : always enclose fields
if ($what == 'excel') {
$row[$j] = ereg_replace("\015(\012)?", "\012", $row[$j]);
$row[$j] = ereg_replace("\015(\012)?", "\012", $row[$j]);
}
if ($enc_by == '') {
$schema_insert .= $row[$j];
} else {
$schema_insert .= $enc_by
. str_replace($enc_by, $esc_by . $enc_by, $row[$j])
. $enc_by;
}
$schema_insert .= $enc_by
. str_replace($enc_by, $esc_by . $enc_by, $row[$j])
. $enc_by;
}
else {
$schema_insert .= '';