diff options
Diffstat (limited to 'includes/bootstrap.inc')
-rw-r--r-- | includes/bootstrap.inc | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/includes/bootstrap.inc b/includes/bootstrap.inc index 78a41f732..8b15ab737 100644 --- a/includes/bootstrap.inc +++ b/includes/bootstrap.inc @@ -302,16 +302,11 @@ function conf_path($require_settings = TRUE, $reset = FALSE) { } /** - * Unsets all disallowed global variables. See $allowed for what's allowed. - */ -function drupal_unset_globals() { - if (ini_get('register_globals')) { - $allowed = array('_ENV' => 1, '_GET' => 1, '_POST' => 1, '_COOKIE' => 1, '_FILES' => 1, '_SERVER' => 1, '_REQUEST' => 1, 'GLOBALS' => 1); - foreach ($GLOBALS as $key => $value) { - if (!isset($allowed[$key])) { - unset($GLOBALS[$key]); - } - } + * Initialize variables needed for the rest of the execution. + */ +function drupal_initialize_variables() { + if (!isset($_SERVER['HTTP_REFERER'])) { + $_SERVER['HTTP_REFERER'] = ''; } } @@ -993,7 +988,7 @@ function _drupal_bootstrap($phase) { switch ($phase) { case DRUPAL_BOOTSTRAP_CONFIGURATION: - drupal_unset_globals(); + drupal_initialize_variables(); // Start a page timer: timer_start('page'); // Initialize the configuration |