From ef95bce35bddf3f01c6c6ad73d1fdac3816719a0 Mon Sep 17 00:00:00 2001 From: Marc Delisle Date: Tue, 27 Mar 2012 13:04:46 -0400 Subject: [PATCH] Final removal of grab_globals script --- libraries/common.inc.php | 7 --- libraries/grab_globals.lib.php | 92 ---------------------------- libraries/tbl_replace_fields.inc.php | 9 --- server_collations.php | 7 --- server_engines.php | 8 --- server_plugins.php | 8 --- server_status.php | 8 --- server_variables.php | 7 --- tbl_chart.php | 8 --- tbl_gis_visualization.php | 8 --- tbl_replace.php | 11 ---- tbl_row_action.php | 8 --- user_password.php | 8 --- view_create.php | 8 --- 14 files changed, 197 deletions(-) delete mode 100644 libraries/grab_globals.lib.php diff --git a/libraries/common.inc.php b/libraries/common.inc.php index 7e48366e01..3d8175b60c 100644 --- a/libraries/common.inc.php +++ b/libraries/common.inc.php @@ -272,13 +272,6 @@ if (version_compare(phpversion(), '5.4', 'lt')) { } } -/** - * include deprecated grab_globals only if required - */ -if (empty($__redirect) && !defined('PMA_NO_VARIABLES_IMPORT')) { - include './libraries/grab_globals.lib.php'; -} - /** * check timezone setting * this could produce an E_STRICT - but only once, diff --git a/libraries/grab_globals.lib.php b/libraries/grab_globals.lib.php deleted file mode 100644 index 214fd336dd..0000000000 --- a/libraries/grab_globals.lib.php +++ /dev/null @@ -1,92 +0,0 @@ - diff --git a/libraries/tbl_replace_fields.inc.php b/libraries/tbl_replace_fields.inc.php index 4830b93bb3..96ec4ab58e 100644 --- a/libraries/tbl_replace_fields.inc.php +++ b/libraries/tbl_replace_fields.inc.php @@ -15,21 +15,12 @@ * default is to advance to the field-value parsing. Will only be set to * true when a binary file is uploaded, thus bypassing further manipulation of $val. * - * note: grab_globals has extracted the fields from _FILES or HTTP_POST_FILES - * - * * @package PhpMyAdmin */ if (! defined('PHPMYADMIN')) { exit; } -/** - * do not import request variable into global scope - */ -if (! defined('PMA_NO_VARIABLES_IMPORT')) { - define('PMA_NO_VARIABLES_IMPORT', true); -} /** * Gets some core libraries */ diff --git a/server_collations.php b/server_collations.php index b9510cfb5e..2d2a67b78b 100644 --- a/server_collations.php +++ b/server_collations.php @@ -5,13 +5,6 @@ * @package PhpMyAdmin */ -/** - * no need for variables importing - * @ignore - */ -if (! defined('PMA_NO_VARIABLES_IMPORT')) { - define('PMA_NO_VARIABLES_IMPORT', true); -} /** * requirements */ diff --git a/server_engines.php b/server_engines.php index 3e51819554..81d0bdbcbe 100644 --- a/server_engines.php +++ b/server_engines.php @@ -6,14 +6,6 @@ * @package PhpMyAdmin */ -/** - * no need for variables importing - * @ignore - */ -if (! defined('PMA_NO_VARIABLES_IMPORT')) { - define('PMA_NO_VARIABLES_IMPORT', true); -} - /** * requirements */ diff --git a/server_plugins.php b/server_plugins.php index 1a4ac02403..3e95b5389a 100644 --- a/server_plugins.php +++ b/server_plugins.php @@ -5,14 +5,6 @@ * @package PhpMyAdmin */ -/** - * no need for variables importing - * @ignore - */ -if (! defined('PMA_NO_VARIABLES_IMPORT')) { - define('PMA_NO_VARIABLES_IMPORT', true); -} - /** * requirements */ diff --git a/server_status.php b/server_status.php index 24954346f4..ef663ce509 100644 --- a/server_status.php +++ b/server_status.php @@ -7,14 +7,6 @@ * @package PhpMyAdmin */ -/** - * no need for variables importing - * @ignore - */ -if (! defined('PMA_NO_VARIABLES_IMPORT')) { - define('PMA_NO_VARIABLES_IMPORT', true); -} - if (isset($_REQUEST['ajax_request']) && $_REQUEST['ajax_request'] == true) { $GLOBALS['is_header_sent'] = true; } diff --git a/server_variables.php b/server_variables.php index fb5e3b5679..9e2686783f 100644 --- a/server_variables.php +++ b/server_variables.php @@ -5,13 +5,6 @@ * @package PhpMyAdmin */ -/** - * no need for variables importing - * @ignore - */ -if (! defined('PMA_NO_VARIABLES_IMPORT')) { - define('PMA_NO_VARIABLES_IMPORT', true); -} require_once 'libraries/common.inc.php'; $GLOBALS['js_include'][] = 'server_variables.js'; diff --git a/tbl_chart.php b/tbl_chart.php index b4a290b8d1..83ae074614 100644 --- a/tbl_chart.php +++ b/tbl_chart.php @@ -6,14 +6,6 @@ * @package PhpMyAdmin */ -/** - * do not import request variable into global scope - * @ignore - */ -if (! defined('PMA_NO_VARIABLES_IMPORT')) { - define('PMA_NO_VARIABLES_IMPORT', true); -} - /** * */ diff --git a/tbl_gis_visualization.php b/tbl_gis_visualization.php index 8a37a84e71..c5eae72a87 100644 --- a/tbl_gis_visualization.php +++ b/tbl_gis_visualization.php @@ -5,14 +5,6 @@ * @package PhpMyAdmin */ -/** - * do not import request variable into global scope - * @ignore - */ -if (! defined('PMA_NO_VARIABLES_IMPORT')) { - define('PMA_NO_VARIABLES_IMPORT', true); -} - require_once 'libraries/common.inc.php'; $GLOBALS['js_include'][] = 'openlayers/OpenLayers.js'; diff --git a/tbl_replace.php b/tbl_replace.php index f0d8bced45..21d963f92c 100644 --- a/tbl_replace.php +++ b/tbl_replace.php @@ -11,17 +11,6 @@ * @package PhpMyAdmin */ -/** - * do not import request variable into global scope - * - * cannot be used as long as it could happen that the $goto file that is included - * at the end of this script is not updated to work without imported request variables - * - * @todo uncomment this if all possible included files to rely on import request variables -if (! defined('PMA_NO_VARIABLES_IMPORT')) { - define('PMA_NO_VARIABLES_IMPORT', true); -} - */ /** * Gets some core libraries */ diff --git a/tbl_row_action.php b/tbl_row_action.php index d669648d36..d8d3a97ea1 100644 --- a/tbl_row_action.php +++ b/tbl_row_action.php @@ -6,14 +6,6 @@ * @package PhpMyAdmin */ - -/** - * do not globalize/import request variables - * can only be enabled if all included files are switched superglobals too - * but leave this here to show that this file is 'superglobalized' -define('PMA_NO_VARIABLES_IMPORT', true); - */ - /** * */ diff --git a/user_password.php b/user_password.php index c4fdaabaa8..262f76371f 100644 --- a/user_password.php +++ b/user_password.php @@ -7,14 +7,6 @@ * @package PhpMyAdmin */ -/** - * no need for variables importing - * @ignore - */ -if (! defined('PMA_NO_VARIABLES_IMPORT')) { - define('PMA_NO_VARIABLES_IMPORT', true); -} - /** * Gets some core libraries */ diff --git a/view_create.php b/view_create.php index 3e36efbf19..17b414229c 100644 --- a/view_create.php +++ b/view_create.php @@ -8,14 +8,6 @@ * @package PhpMyAdmin */ -/** - * do not import request variable into global scope - * @ignore - */ -if (! defined('PMA_NO_VARIABLES_IMPORT')) { - define('PMA_NO_VARIABLES_IMPORT', true); -} - /** * */