Permalink
Browse files

patch #2739001 [export] XML does not allow spaces in element names

  • Loading branch information...
lem9 committed Apr 19, 2009
1 parent e3f943e commit e9a52d7729575814325f950e2943865b9b47624c
Showing with 7 additions and 1 deletion.
  1. +2 −0 ChangeLog
  2. +5 −1 libraries/export/xml.php
View
@@ -6,6 +6,8 @@ $Id$
$HeadURL: https://phpmyadmin.svn.sourceforge.net/svnroot/phpmyadmin/trunk/phpMyAdmin/ChangeLog $
3.1.5.0 (not yet released)
- patch #2739001 [export] XML does not allow spaces in element names,
thanks to Derek Schaefer - drummingds1
3.1.4.0 (not yet released)
+ patch #1808339 [doc] Apache SSLOptions and StdEnvVars FAQ,
View
@@ -95,6 +95,7 @@ function PMA_exportHeader() {
*/
function PMA_exportDBHeader($db) {
global $crlf;
$db = str_replace(' ', '_', $db);
$head = '<!--' . $crlf
. '- ' . $GLOBALS['strDatabase'] . ': ' . (isset($GLOBALS['use_backquotes']) ? PMA_backquote($db) : '\'' . $db . '\''). $crlf
. '-->' . $crlf
@@ -113,6 +114,7 @@ function PMA_exportDBHeader($db) {
*/
function PMA_exportDBFooter($db) {
global $crlf;
$db = str_replace(' ', '_', $db);
return PMA_exportOutputHandler('</' . $db . '>' . $crlf);
}
@@ -144,11 +146,13 @@ function PMA_exportDBCreate($db) {
* @access public
*/
function PMA_exportData($db, $table, $crlf, $error_url, $sql_query) {
$db = str_replace(' ', '_', $db);
$table = str_replace(' ', '_', $table);
$result = PMA_DBI_query($sql_query, null, PMA_DBI_QUERY_UNBUFFERED);
$columns_cnt = PMA_DBI_num_fields($result);
for ($i = 0; $i < $columns_cnt; $i++) {
$columns[$i] = stripslashes(PMA_DBI_field_name($result, $i));
$columns[$i] = stripslashes(str_replace(' ', '_', PMA_DBI_field_name($result, $i)));
}
unset($i);

0 comments on commit e9a52d7

Please sign in to comment.