undefined variables

This commit is contained in:
Marc Delisle
2009-12-29 17:58:07 +00:00
parent e7d20c38bf
commit 0a217b9b62

View File

@@ -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 .= ' </pma:' . $type . '>' . $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
. ' - ' . $GLOBALS['strDatabase'] . ': ' . (isset($GLOBALS['use_backquotes']) ? PMA_backquote($db) : '\'' . $db . '\''). $crlf
. ' -->' . $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(' </database>' . $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);