define variables only where needed, and use NULL to define them, as some places test only for isset and not for content

This commit is contained in:
Sebastian Mendel
2005-11-26 06:35:23 +00:00
parent af66555969
commit 5afd8905a6
3 changed files with 10 additions and 3 deletions

View File

@@ -7,6 +7,9 @@ $Source$
2005-11-24 Sebastian Mendel <cybot_tm@users.sourceforge.net>
* 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 <lem9@users.sourceforge.net>
* main.php: move server choice into MySQL container

View File

@@ -54,9 +54,6 @@ $GLOBALS['PMA_errors'] = array();
/**
* Avoids undefined variables
*/
if (!isset($use_backquotes)) {
$use_backquotes = 0;
}
if (!isset($pos)) {
$pos = 0;
}

View File

@@ -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
*