diff --git a/ChangeLog b/ChangeLog index a0fc4b290..d482fd1bd 100755 --- a/ChangeLog +++ b/ChangeLog @@ -17,6 +17,8 @@ $Source$ libraries/export/*: Support for enclosing SQL export in transaction (RFE #930827). * libraries/export/csv.php: Do not strip export too much (bug #913988). + * libraries/export/xml.php: Use PMA_DBI_fetch_row and drop PHP 3 + compatibility code. 2004-04-13 Marc Delisle * libraries/relation.lib.php: bug 930445 when PMA_table_info not defined, diff --git a/libraries/export/xml.php b/libraries/export/xml.php index 088227ec7..14488d970 100644 --- a/libraries/export/xml.php +++ b/libraries/export/xml.php @@ -135,12 +135,11 @@ function PMA_exportData($db, $table, $crlf, $error_url, $sql_query) { $buffer = ' ' . $crlf; if (!PMA_exportOutputHandler($buffer)) return FALSE; - while ($record = PMA_DBI_fetch_assoc($result)) { + while ($record = PMA_DBI_fetch_row($result)) { $buffer = ' <' . $table . '>' . $crlf; for ($i = 0; $i < $columns_cnt; $i++) { - // 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]]))) { - $buffer .= ' <' . $columns[$i] . '>' . htmlspecialchars(stripslashes($record[$columns[$i]])) + if ( isset($record[$i]) && !is_null($record[$i])) { + $buffer .= ' <' . $columns[$i] . '>' . htmlspecialchars($record[$i]) . '' . $crlf; } }