remove global variables
This commit is contained in:
parent
34e43e461d
commit
1b4cbacaa7
@ -469,7 +469,7 @@ function PMA_getSqlQueryForCopyTable($tables_full, $sql_query, $move, $db)
|
||||
}
|
||||
|
||||
// this does not apply to a rename operation
|
||||
if (isset($GLOBALS['add_constraints'])
|
||||
if (isset($_REQUEST['add_constraints'])
|
||||
&& ! empty($GLOBALS['sql_constraints_query'])
|
||||
) {
|
||||
$GLOBALS['sql_constraints_query_full_db'][]
|
||||
@ -524,10 +524,10 @@ function PMA_handleTheViews($views, $move, $db)
|
||||
$_error = false;
|
||||
// temporarily force to add DROP IF EXIST to CREATE VIEW query,
|
||||
// to remove stand-in VIEW that was created earlier
|
||||
if (isset($GLOBALS['drop_if_exists'])) {
|
||||
$temp_drop_if_exists = $GLOBALS['drop_if_exists'];
|
||||
if (isset($_REQUEST['drop_if_exists'])) {
|
||||
$temp_drop_if_exists = $_REQUEST['drop_if_exists'];
|
||||
}
|
||||
$GLOBALS['drop_if_exists'] = 'true';
|
||||
$_REQUEST['drop_if_exists'] = 'true';
|
||||
|
||||
foreach ($views as $view) {
|
||||
if (! PMA_Table::moveCopy($db, $view, $_REQUEST['newname'],
|
||||
@ -537,10 +537,10 @@ function PMA_handleTheViews($views, $move, $db)
|
||||
break;
|
||||
}
|
||||
}
|
||||
unset($GLOBALS['drop_if_exists']);
|
||||
unset($_REQUEST['drop_if_exists']);
|
||||
if (isset($temp_drop_if_exists)) {
|
||||
// restore previous value
|
||||
$GLOBALS['drop_if_exists'] = $temp_drop_if_exists;
|
||||
$_REQUEST['drop_if_exists'] = $temp_drop_if_exists;
|
||||
}
|
||||
return $_error;
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user