From 2f2a918a27998c50b2c1249386f4a10960849a22 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20=C4=8Ciha=C5=99?= Date: Wed, 14 Apr 2004 13:51:11 +0000 Subject: [PATCH] Use PMA_DBI_fetch_row and drop PHP 3 compatibility code. --- ChangeLog | 2 ++ libraries/export/xml.php | 7 +++---- 2 files changed, 5 insertions(+), 4 deletions(-) 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; } }