diff options
author | Angie Byron <webchick@24967.no-reply.drupal.org> | 2008-10-11 23:32:07 +0000 |
---|---|---|
committer | Angie Byron <webchick@24967.no-reply.drupal.org> | 2008-10-11 23:32:07 +0000 |
commit | 9dc60ce09b2d0ae801307499e437137b8407ce33 (patch) | |
tree | ea13304a14ab733c47265edd093ec0bd00e45595 /modules | |
parent | 4d20274076d4cf4338531333fb4acb23a231e907 (diff) | |
download | brdo-9dc60ce09b2d0ae801307499e437137b8407ce33.tar.gz brdo-9dc60ce09b2d0ae801307499e437137b8407ce33.tar.bz2 |
#295626 by wuf31 and Damien Tournoud: Fix incorrect path for front page in locale_block().
Diffstat (limited to 'modules')
-rw-r--r-- | modules/locale/locale.module | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/modules/locale/locale.module b/modules/locale/locale.module index 128197247..bc4b37070 100644 --- a/modules/locale/locale.module +++ b/modules/locale/locale.module @@ -590,11 +590,12 @@ function locale_block($op = 'list', $delta = '') { // Only show if we have at least two languages and language dependent // web addresses, so we can actually link to other language versions. elseif ($op == 'view' && variable_get('language_count', 1) > 1 && variable_get('language_negotiation', LANGUAGE_NEGOTIATION_NONE) != LANGUAGE_NEGOTIATION_NONE) { + $path = drupal_is_front_page() ? '<front>' : $_GET['q']; $languages = language_list('enabled'); $links = array(); foreach ($languages[1] as $language) { $links[$language->language] = array( - 'href' => $_GET['q'], + 'href' => $path, 'title' => $language->native, 'language' => $language, 'attributes' => array('class' => 'language-link'), @@ -605,7 +606,7 @@ function locale_block($op = 'list', $delta = '') { // A translation link may need to point to a different path or use // a translated link text before going through l(), which will just // handle the path aliases. - drupal_alter('translation_link', $links, $_GET['q']); + drupal_alter('translation_link', $links, $path); $block['subject'] = t('Languages'); $block['content'] = theme('links', $links, array()); |