summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2010-07-16 02:37:06 +0000
committerDries Buytaert <dries@buytaert.net>2010-07-16 02:37:06 +0000
commit2ad0a2c1f79b15ab74c734424a9d4a4d388028c2 (patch)
treeab48b7e5fd849d0b568e5829250aadbe2f274e07 /modules
parentda75021509b179b6c42f633d16cd09a7e6ce339d (diff)
downloadbrdo-2ad0a2c1f79b15ab74c734424a9d4a4d388028c2.tar.gz
brdo-2ad0a2c1f79b15ab74c734424a9d4a4d388028c2.tar.bz2
- Patch #684982 by plach: audit of global language variable use.
Diffstat (limited to 'modules')
-rw-r--r--modules/color/color.module4
-rw-r--r--modules/locale/locale.api.php4
-rw-r--r--modules/locale/locale.module4
-rw-r--r--modules/node/node.module4
4 files changed, 8 insertions, 8 deletions
diff --git a/modules/color/color.module b/modules/color/color.module
index 01b3a432f..682518f04 100644
--- a/modules/color/color.module
+++ b/modules/color/color.module
@@ -73,7 +73,7 @@ function _color_theme_select_form_alter(&$form, &$form_state) {
* Callback for the theme to alter the resources used.
*/
function _color_html_alter(&$vars) {
- global $language, $theme_key;
+ global $theme_key;
$themes = list_themes();
// Override stylesheets.
@@ -102,7 +102,7 @@ function _color_html_alter(&$vars) {
* Callback for the theme to alter the resources used.
*/
function _color_page_alter(&$vars) {
- global $language, $theme_key;
+ global $theme_key;
// Override logo.
$logo = variable_get('color_' . $theme_key . '_logo');
diff --git a/modules/locale/locale.api.php b/modules/locale/locale.api.php
index f39379e66..595447f1a 100644
--- a/modules/locale/locale.api.php
+++ b/modules/locale/locale.api.php
@@ -68,8 +68,8 @@ function hook_language_init() {
function hook_language_switch_links_alter(array &$links, $type, $path) {
global $language;
- if ($type == LANGUAGE_TYPE_CONTENT && isset($links[$language])) {
- foreach ($links[$language] as $link) {
+ if ($type == LANGUAGE_TYPE_CONTENT && isset($links[$language->language])) {
+ foreach ($links[$language->language] as $link) {
$link['attributes']['class'][] = 'active-language';
}
}
diff --git a/modules/locale/locale.module b/modules/locale/locale.module
index e122b9f93..29659ac6f 100644
--- a/modules/locale/locale.module
+++ b/modules/locale/locale.module
@@ -1000,7 +1000,7 @@ function locale_form_comment_form_alter(&$form, &$form_state, $form_id) {
// If a content type has multilingual support we set the content language as
// comment language.
if (empty($form['language']['#value']) && locale_multilingual_node_type($form['#node']->type)) {
- global $language;
- $form['language']['#value'] = $language->language;
+ global $language_content;
+ $form['language']['#value'] = $language_content->language;
}
}
diff --git a/modules/node/node.module b/modules/node/node.module
index 594df7241..5e875f281 100644
--- a/modules/node/node.module
+++ b/modules/node/node.module
@@ -2354,7 +2354,7 @@ function node_block_list_alter(&$blocks) {
* The link should be an absolute URL.
*/
function node_feed($nids = FALSE, $channel = array()) {
- global $base_url, $language;
+ global $base_url, $language_content;
if ($nids === FALSE) {
$nids = db_select('node', 'n')
@@ -2409,7 +2409,7 @@ function node_feed($nids = FALSE, $channel = array()) {
'title' => variable_get('site_name', 'Drupal'),
'link' => $base_url,
'description' => variable_get('feed_description', ''),
- 'language' => $language->language
+ 'language' => $language_content->language
);
$channel_extras = array_diff_key($channel, $channel_defaults);
$channel = array_merge($channel_defaults, $channel);