$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';
|
$goto = 'server_import.php';
|
||||||
} else {
|
} else {
|
||||||
if (empty($goto) || !preg_match('@^(server|db|tbl)(_[a-z]*)*\.php$@i', $goto)) {
|
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';
|
$goto = 'tbl_structure.php';
|
||||||
} elseif (isset($db)) {
|
} elseif (strlen($db)) {
|
||||||
$goto = 'db_structure.php';
|
$goto = 'db_structure.php';
|
||||||
} else {
|
} else {
|
||||||
$goto = 'server_sql.php';
|
$goto = 'server_sql.php';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (isset($table) && isset($db)) {
|
if (strlen($table) && strlen($db)) {
|
||||||
$common = PMA_generate_common_url($db, $table);
|
$common = PMA_generate_common_url($db, $table);
|
||||||
} elseif (isset($db)) {
|
} elseif (strlen($db)) {
|
||||||
$common = PMA_generate_common_url($db);
|
$common = PMA_generate_common_url($db);
|
||||||
} else {
|
} else {
|
||||||
$common = PMA_generate_common_url();
|
$common = PMA_generate_common_url();
|
||||||
@@ -97,7 +97,7 @@ if ($import_type == 'table') {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (isset($db)) {
|
if (strlen($db)) {
|
||||||
PMA_DBI_select_db($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
|
// the query does not work if this string is in double quotes
|
||||||
// and MySQL is running in ANSI mode
|
// and MySQL is running in ANSI mode
|
||||||
$return = PMA_DBI_fetch_value('SHOW VARIABLES LIKE \'collation_database\'', 0, 1);
|
$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']);
|
PMA_DBI_select_db($GLOBALS['db']);
|
||||||
}
|
}
|
||||||
return $return;
|
return $return;
|
||||||
|
@@ -10,8 +10,6 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
if (empty($query_url)) {
|
if (empty($query_url)) {
|
||||||
$db = ! isset($db) ? '' : $db;
|
|
||||||
$table = ! isset($table) ? '' : $table;
|
|
||||||
$query_url = PMA_generate_common_url($db, $table);
|
$query_url = PMA_generate_common_url($db, $table);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user