Added some stripslashes to generate correct exports.
This commit is contained in:
@@ -5,6 +5,11 @@ phpMyAdmin - Changelog
|
|||||||
$Id$
|
$Id$
|
||||||
$Source$
|
$Source$
|
||||||
|
|
||||||
|
2003-08-11 Michal Cihar <nijel@users.sourceforge.net>
|
||||||
|
* libraries/export/csv.php3, libraries/export/latex.php3,
|
||||||
|
libraries/export/xml.php3: Added some stripslashes to generate correct
|
||||||
|
exports.
|
||||||
|
|
||||||
2003-08-10 Marc Delisle <lem9@users.sourceforge.net>
|
2003-08-10 Marc Delisle <lem9@users.sourceforge.net>
|
||||||
* server_status.php3: bug 786331, a 100,00% not internationalized,
|
* server_status.php3: bug 786331, a 100,00% not internationalized,
|
||||||
and align values for "More status variables"
|
and align values for "More status variables"
|
||||||
|
@@ -121,10 +121,10 @@ function PMA_exportData($db, $table, $crlf, $error_url, $sql_query) {
|
|||||||
$schema_insert = '';
|
$schema_insert = '';
|
||||||
for ($i = 0; $i < $fields_cnt; $i++) {
|
for ($i = 0; $i < $fields_cnt; $i++) {
|
||||||
if ($enclosed == '') {
|
if ($enclosed == '') {
|
||||||
$schema_insert .= mysql_field_name($result, $i);
|
$schema_insert .= stripslashes(mysql_field_name($result, $i));
|
||||||
} else {
|
} else {
|
||||||
$schema_insert .= $enclosed
|
$schema_insert .= $enclosed
|
||||||
. str_replace($enclosed, $escaped . $enclosed, mysql_field_name($result, $i))
|
. str_replace($enclosed, $escaped . $enclosed, stripslashes(mysql_field_name($result, $i)))
|
||||||
. $enclosed;
|
. $enclosed;
|
||||||
}
|
}
|
||||||
$schema_insert .= $separator;
|
$schema_insert .= $separator;
|
||||||
@@ -142,6 +142,7 @@ function PMA_exportData($db, $table, $crlf, $error_url, $sql_query) {
|
|||||||
$schema_insert .= $GLOBALS[$what . '_replace_null'];
|
$schema_insert .= $GLOBALS[$what . '_replace_null'];
|
||||||
}
|
}
|
||||||
else if ($row[$j] == '0' || $row[$j] != '') {
|
else if ($row[$j] == '0' || $row[$j] != '') {
|
||||||
|
$row[$j] = stripslashes($row[$j]);
|
||||||
// loic1 : always enclose fields
|
// loic1 : always enclose fields
|
||||||
if ($what == 'excel') {
|
if ($what == 'excel') {
|
||||||
$row[$j] = ereg_replace("\015(\012)?", "\012", $row[$j]);
|
$row[$j] = ereg_replace("\015(\012)?", "\012", $row[$j]);
|
||||||
|
@@ -124,7 +124,7 @@ function PMA_exportData($db, $table, $crlf, $error_url, $sql_query) {
|
|||||||
|
|
||||||
// show column names
|
// show column names
|
||||||
if (isset($GLOBALS['latex_showcolumns'])) {
|
if (isset($GLOBALS['latex_showcolumns'])) {
|
||||||
$local_buffer = implode("\000", $columns);
|
$local_buffer = stripslashes(implode("\000", $columns));
|
||||||
for($k=0;$k<count($tex_escape);$k++) {
|
for($k=0;$k<count($tex_escape);$k++) {
|
||||||
$local_buffer = str_replace($tex_escape[$k], '\\' . $tex_escape[$k], $local_buffer);
|
$local_buffer = str_replace($tex_escape[$k], '\\' . $tex_escape[$k], $local_buffer);
|
||||||
}
|
}
|
||||||
@@ -141,7 +141,7 @@ function PMA_exportData($db, $table, $crlf, $error_url, $sql_query) {
|
|||||||
// print each row
|
// print each row
|
||||||
for($i = 0; $i < $columns_cnt; $i++) {
|
for($i = 0; $i < $columns_cnt; $i++) {
|
||||||
if ( isset($record[$columns[$i]]) && (!function_exists('is_null') || !is_null($record[$columns[$i]]))) {
|
if ( isset($record[$columns[$i]]) && (!function_exists('is_null') || !is_null($record[$columns[$i]]))) {
|
||||||
$column_value = $record[$columns[$i]];
|
$column_value = stripslashes($record[$columns[$i]]);
|
||||||
|
|
||||||
// $ % { } & # _ ^
|
// $ % { } & # _ ^
|
||||||
// escaping special characters
|
// escaping special characters
|
||||||
|
@@ -110,7 +110,7 @@ function PMA_exportData($db, $table, $crlf, $error_url, $sql_query) {
|
|||||||
|
|
||||||
$columns_cnt = mysql_num_fields($result);
|
$columns_cnt = mysql_num_fields($result);
|
||||||
for ($i = 0; $i < $columns_cnt; $i++) {
|
for ($i = 0; $i < $columns_cnt; $i++) {
|
||||||
$columns[$i] = mysql_field_name($result, $i);
|
$columns[$i] = stripslashes(mysql_field_name($result, $i));
|
||||||
}
|
}
|
||||||
unset($i);
|
unset($i);
|
||||||
|
|
||||||
@@ -122,7 +122,7 @@ function PMA_exportData($db, $table, $crlf, $error_url, $sql_query) {
|
|||||||
for ($i = 0; $i < $columns_cnt; $i++) {
|
for ($i = 0; $i < $columns_cnt; $i++) {
|
||||||
// There is no way to dectect a "NULL" value with PHP3
|
// There is no way to dectect a "NULL" value with PHP3
|
||||||
if ( isset($record[$columns[$i]]) && (!function_exists('is_null') || !is_null($record[$columns[$i]]))) {
|
if ( isset($record[$columns[$i]]) && (!function_exists('is_null') || !is_null($record[$columns[$i]]))) {
|
||||||
$buffer .= ' <' . $columns[$i] . '>' . htmlspecialchars($record[$columns[$i]])
|
$buffer .= ' <' . $columns[$i] . '>' . htmlspecialchars(stripslashes($record[$columns[$i]]))
|
||||||
. '</' . $columns[$i] . '>' . $crlf;
|
. '</' . $columns[$i] . '>' . $crlf;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user