$db and $table is always set, no need to check
This commit is contained in:
10
import.php
10
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);
|
||||
}
|
||||
|
||||
|
@@ -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;
|
||||
|
@@ -10,8 +10,6 @@
|
||||
*
|
||||
*/
|
||||
if (empty($query_url)) {
|
||||
$db = ! isset($db) ? '' : $db;
|
||||
$table = ! isset($table) ? '' : $table;
|
||||
$query_url = PMA_generate_common_url($db, $table);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user