From 50fb0beb7d76edb25b2792fb878e26bbf11cd33d Mon Sep 17 00:00:00 2001 From: webchick Date: Thu, 27 Oct 2011 08:16:41 -0700 Subject: [PATCH] Issue #673020 follow-up by attiks: Critical fix to Content-Language HTTP header to not cause issues with Drush. --- includes/bootstrap.inc | 4 ---- includes/common.inc | 4 ++++ 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/includes/bootstrap.inc b/includes/bootstrap.inc index 026545794ca..78f54de04cb 100644 --- a/includes/bootstrap.inc +++ b/includes/bootstrap.inc @@ -2498,7 +2498,6 @@ function get_t() { * Initialize all the defined language types. */ function drupal_language_initialize() { - global $language; $types = language_types(); // Ensure the language is correctly returned, even without multilanguage @@ -2518,9 +2517,6 @@ function drupal_language_initialize() { // environments. bootstrap_invoke_all('language_init'); } - - // Send appropriate HTTP-Header for browsers and search engines. - header('Content-Language: ' . $language->language); } /** diff --git a/includes/common.inc b/includes/common.inc index 3a3d2747326..e3c1cd2bc84 100644 --- a/includes/common.inc +++ b/includes/common.inc @@ -2466,6 +2466,10 @@ function drupal_deliver_html_page($page_callback_result) { drupal_add_http_header('Content-Type', 'text/html; charset=utf-8'); } + // Send appropriate HTTP-Header for browsers and search engines. + global $language; + drupal_add_http_header('Content-Language', $language->language); + // Menu status constants are integers; page content is a string or array. if (is_int($page_callback_result)) { // @todo: Break these up into separate functions?