From 1b4cbacaa7fa3f8a419f9265c32e283abc0dc966 Mon Sep 17 00:00:00 2001 From: Thilina Buddika Date: Fri, 27 Jul 2012 02:33:50 +0530 Subject: [PATCH] remove global variables --- libraries/db_operations.lib.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/libraries/db_operations.lib.php b/libraries/db_operations.lib.php index f882602335..7a0394c049 100644 --- a/libraries/db_operations.lib.php +++ b/libraries/db_operations.lib.php @@ -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; }