Mercurial > defr > drupal > core
diff modules/locale/locale.module @ 13:8b6c45761e01 6.6
Drupal 6.6
author | Franck Deroche <webmaster@defr.org> |
---|---|
date | Tue, 23 Dec 2008 14:32:33 +0100 |
parents | 589fb7c02327 |
children |
line wrap: on
line diff
--- a/modules/locale/locale.module Tue Dec 23 14:32:19 2008 +0100 +++ b/modules/locale/locale.module Tue Dec 23 14:32:33 2008 +0100 @@ -1,5 +1,5 @@ <?php -// $Id: locale.module,v 1.212.2.4 2008/09/08 21:51:50 dries Exp $ +// $Id: locale.module,v 1.212.2.5 2008/10/20 09:31:06 goba Exp $ /** * @file @@ -573,11 +573,12 @@ // 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'), @@ -588,7 +589,7 @@ // 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());