diff --git a/libraries/export/xml.php b/libraries/export/xml.php index e55c52b1d..5b82ad5ec 100644 --- a/libraries/export/xml.php +++ b/libraries/export/xml.php @@ -84,8 +84,8 @@ function PMA_exportHeader() { global $table; global $tables; - $export_struct = $GLOBALS[$what . '_export_struc']; - $export_data = $GLOBALS[$what . '_export_contents']; + $export_struct = isset($GLOBALS[$what . '_export_struc']) ? true : false; + $export_data = isset($GLOBALS[$what . '_export_contents']) ? true : false; if ($GLOBALS['output_charset_conversion']) { $charset = $GLOBALS['charset_of_file']; @@ -139,11 +139,11 @@ function PMA_exportHeader() { $type = 'table'; } - if ($is_view && !$GLOBALS[$what . '_export_views']) { + if ($is_view && ! isset($GLOBALS[$what . '_export_views'])) { continue; } - if (!$is_view && !$GLOBALS[$what . '_export_tables']) { + if (! $is_view && ! isset($GLOBALS[$what . '_export_tables'])) { continue; } @@ -155,7 +155,7 @@ function PMA_exportHeader() { $head .= $tbl . ';' . $crlf; $head .= ' ' . $crlf; - if ($GLOBALS[$what . '_export_triggers']) { + if (isset($GLOBALS[$what . '_export_triggers']) && $GLOBALS[$what . '_export_triggers']) { // Export triggers $triggers = PMA_DBI_get_triggers($db, $table); if ($triggers) { @@ -178,7 +178,7 @@ function PMA_exportHeader() { } } - if ($GLOBALS[$what . '_export_functions']) { + if (isset($GLOBALS[$what . '_export_functions']) && $GLOBALS[$what . '_export_functions']) { // Export functions $functions = PMA_DBI_get_procedures_or_functions($db, 'FUNCTION'); if ($functions) { @@ -201,7 +201,7 @@ function PMA_exportHeader() { } } - if ($GLOBALS[$what . '_export_procedures']) { + if (isset($GLOBALS[$what . '_export_procedures']) && $GLOBALS[$what . '_export_procedures']) { // Export procedures $procedures = PMA_DBI_get_procedures_or_functions($db, 'PROCEDURE'); if ($procedures) { @@ -250,8 +250,7 @@ function PMA_exportDBHeader($db) { global $crlf; global $what; - if ($GLOBALS[$what . '_export_contents']) - { + if (isset($GLOBALS[$what . '_export_contents']) && $GLOBALS[$what . '_export_contents']) { $head = ' ' . $crlf @@ -278,8 +277,7 @@ function PMA_exportDBFooter($db) { global $crlf; global $what; - if ($GLOBALS[$what . '_export_contents']) - { + if (isset($GLOBALS[$what . '_export_contents']) && $GLOBALS[$what . '_export_contents']) { return PMA_exportOutputHandler(' ' . $crlf); } else @@ -318,8 +316,7 @@ function PMA_exportDBCreate($db) { function PMA_exportData($db, $table, $crlf, $error_url, $sql_query) { global $what; - if ($GLOBALS[$what . '_export_contents']) - { + if (isset($GLOBALS[$what . '_export_contents']) && $GLOBALS[$what . '_export_contents']) { $result = PMA_DBI_query($sql_query, null, PMA_DBI_QUERY_UNBUFFERED); $columns_cnt = PMA_DBI_num_fields($result);