From 1a9b66264d7f1e6d8dc5a7be44e1c3da8741afd3 Mon Sep 17 00:00:00 2001 From: Angie Byron Date: Sat, 9 Oct 2010 17:38:41 +0000 Subject: #780316 by plach: Fixed missing node translation links when no language detection is configured. --- modules/locale/locale.module | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'modules/locale') 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']); + } } } -- cgit v1.2.3