diff --git a/ChangeLog b/ChangeLog index 09f1a765bd..8206f95b41 100644 --- a/ChangeLog +++ b/ChangeLog @@ -33,6 +33,7 @@ values - bug #3916 [interface] Missing scrollbar (original theme) + [vendor] add tcpdf path to vendor_config.php - bug fix compat with tcpdf >= 6.0 (tested with 6.0.012) +- bug #3910 Export database with empty table as a php array, does not produce valid PHP 4.0.0.0 (2013-05-03) + Patch #3481047 for rfe #3480477 Insert as new row enhancement diff --git a/libraries/plugins/export/ExportPhparray.class.php b/libraries/plugins/export/ExportPhparray.class.php index cbe5e2c039..2d3b73c545 100644 --- a/libraries/plugins/export/ExportPhparray.class.php +++ b/libraries/plugins/export/ExportPhparray.class.php @@ -191,16 +191,17 @@ class ExportPhparray extends ExportPlugin $buffer = ''; $record_cnt = 0; + // Output table name as comment + $buffer .= $crlf . '// ' + . PMA_Util::backquote($db) . '.' + . PMA_Util::backquote($table) . $crlf; + $buffer .= '$' . $tablefixed . ' = array('; + while ($record = PMA_DBI_fetch_row($result)) { $record_cnt++; - // Output table name as comment if it's the first record of the table if ($record_cnt == 1) { - $buffer .= $crlf . '// ' - . PMA_Util::backquote($db) . '.' - . PMA_Util::backquote($table) . $crlf; - $buffer .= '$' . $tablefixed . ' = array(' . $crlf; - $buffer .= ' array('; + $buffer .= $crlf . ' array('; } else { $buffer .= ',' . $crlf . ' array('; } @@ -223,4 +224,4 @@ class ExportPhparray extends ExportPlugin return true; } } -?> \ No newline at end of file +?>