diff options
author | Angie Byron <webchick@24967.no-reply.drupal.org> | 2010-10-09 17:38:41 +0000 |
---|---|---|
committer | Angie Byron <webchick@24967.no-reply.drupal.org> | 2010-10-09 17:38:41 +0000 |
commit | 1a9b66264d7f1e6d8dc5a7be44e1c3da8741afd3 (patch) | |
tree | 6de520e45c5d413b3bf0e646abec37065e4a6497 /modules/locale | |
parent | 1a9758c6734bda78a9393eb85cd2244f8bfad952 (diff) | |
download | brdo-1a9b66264d7f1e6d8dc5a7be44e1c3da8741afd3.tar.gz brdo-1a9b66264d7f1e6d8dc5a7be44e1c3da8741afd3.tar.bz2 |
#780316 by plach: Fixed missing node translation links when no language detection is configured.
Diffstat (limited to 'modules/locale')
-rw-r--r-- | modules/locale/locale.module | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/modules/locale/locale.module b/modules/locale/locale.module index 92147aa8a..46a3f86db 100644 --- a/modules/locale/locale.module +++ b/modules/locale/locale.module @@ -941,7 +941,11 @@ function locale_block_view($type) { function locale_url_outbound_alter(&$path, &$options, $original_path) { // Only modify internal URLs. if (!$options['external'] && drupal_multilingual()) { - static $callbacks; + static $drupal_static_fast; + if (!isset($drupal_static_fast)) { + $drupal_static_fast['callbacks'] = &drupal_static(__FUNCTION__); + } + $callbacks = &$drupal_static_fast['callbacks']; if (!isset($callbacks)) { $callbacks = array(); @@ -969,6 +973,11 @@ function locale_url_outbound_alter(&$path, &$options, $original_path) { foreach ($callbacks as $callback) { $callback($path, $options); } + + // No language dependent path allowed in this mode. + if (empty($callbacks)) { + unset($options['language']); + } } } |