diff --git a/import.php b/import.php index e68ab3206..89f8a292f 100644 --- a/import.php +++ b/import.php @@ -76,17 +76,17 @@ if ($import_type == 'table') { $goto = 'server_import.php'; } else { if (empty($goto) || !preg_match('@^(server|db|tbl)(_[a-z]*)*\.php$@i', $goto)) { - if (isset($table) && isset($db)) { + if (strlen($table) && strlen($db)) { $goto = 'tbl_structure.php'; - } elseif (isset($db)) { + } elseif (strlen($db)) { $goto = 'db_structure.php'; } else { $goto = 'server_sql.php'; } } - if (isset($table) && isset($db)) { + if (strlen($table) && strlen($db)) { $common = PMA_generate_common_url($db, $table); - } elseif (isset($db)) { + } elseif (strlen($db)) { $common = PMA_generate_common_url($db); } else { $common = PMA_generate_common_url(); @@ -97,7 +97,7 @@ if ($import_type == 'table') { } -if (isset($db)) { +if (strlen($db)) { PMA_DBI_select_db($db); } diff --git a/libraries/mysql_charsets.lib.php b/libraries/mysql_charsets.lib.php index 510246fd7..f5896a2e5 100644 --- a/libraries/mysql_charsets.lib.php +++ b/libraries/mysql_charsets.lib.php @@ -130,7 +130,7 @@ if (PMA_MYSQL_INT_VERSION >= 40100){ // the query does not work if this string is in double quotes // and MySQL is running in ANSI mode $return = PMA_DBI_fetch_value('SHOW VARIABLES LIKE \'collation_database\'', 0, 1); - if (isset($GLOBALS['db']) && $db !== $GLOBALS['db']) { + if ($db !== $GLOBALS['db']) { PMA_DBI_select_db($GLOBALS['db']); } return $return; diff --git a/libraries/navigation_header.inc.php b/libraries/navigation_header.inc.php index 360c489bd..3ed043cdb 100644 --- a/libraries/navigation_header.inc.php +++ b/libraries/navigation_header.inc.php @@ -10,8 +10,6 @@ * */ if (empty($query_url)) { - $db = ! isset($db) ? '' : $db; - $table = ! isset($table) ? '' : $table; $query_url = PMA_generate_common_url($db, $table); }