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

This commit is contained in:
Marc Delisle
2009-04-19 12:24:45 +00:00
parent e1a3ecff6f
commit c2c260b79e
2 changed files with 7 additions and 1 deletions

View File

@@ -59,6 +59,8 @@ $HeadURL: https://phpmyadmin.svn.sourceforge.net/svnroot/phpmyadmin/trunk/phpMyA
thanks to Tomas Srnka - tomassrnka
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 File

@@ -96,6 +96,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
@@ -114,6 +115,7 @@ function PMA_exportDBHeader($db) {
*/
function PMA_exportDBFooter($db) {
global $crlf;
$db = str_replace(' ', '_', $db);
return PMA_exportOutputHandler('</' . $db . '>' . $crlf);
}
@@ -145,11 +147,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);