diff --git a/ChangeLog b/ChangeLog index 4d155e096..cb4f92393 100755 --- a/ChangeLog +++ b/ChangeLog @@ -7,6 +7,9 @@ $Source$ 2005-11-24 Sebastian Mendel * libraries/grab_globals.lib.php: allow scripts to bypass importing vars + * libraries/common.lib.php, libraries/export/sql.php: define variables only + where needed, and use NULL to define them, as some places test only for + isset and not for content 2005-11-25 Marc Delisle * main.php: move server choice into MySQL container diff --git a/libraries/common.lib.php b/libraries/common.lib.php index c37c4c12f..3f96043a4 100644 --- a/libraries/common.lib.php +++ b/libraries/common.lib.php @@ -54,9 +54,6 @@ $GLOBALS['PMA_errors'] = array(); /** * Avoids undefined variables */ -if (!isset($use_backquotes)) { - $use_backquotes = 0; -} if (!isset($pos)) { $pos = 0; } diff --git a/libraries/export/sql.php b/libraries/export/sql.php index b211bc675..d83420357 100644 --- a/libraries/export/sql.php +++ b/libraries/export/sql.php @@ -10,6 +10,13 @@ */ $GLOBALS['comment_marker'] = '-- '; +/** + * Avoids undefined variables, use NULL so isset() returns false + */ +if ( ! isset( $use_backquotes ) ) { + $use_backquotes = NULL; +} + /** * Outputs comment *