From afacb52295dafc6a82a86c601816bc6494cce20c Mon Sep 17 00:00:00 2001 From: Dries Date: Thu, 26 Jan 2012 11:09:59 -0500 Subject: [PATCH] - Patch #852524 by plach, oriol_e9g: include language provider files only when they are needed. --- core/modules/locale/locale.module | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/core/modules/locale/locale.module b/core/modules/locale/locale.module index 6b189889b50..01e9d91f151 100644 --- a/core/modules/locale/locale.module +++ b/core/modules/locale/locale.module @@ -977,13 +977,12 @@ function locale_url_outbound_alter(&$path, &$options, $original_path) { $negotiation = variable_get("language_negotiation_$type", array()); foreach ($negotiation as $id => $provider) { - if (isset($provider['file'])) { - require_once DRUPAL_ROOT . '/' . $provider['file']; - } - - // Avoid duplicate callback entries. if (isset($provider['callbacks']['url_rewrite'])) { - $callbacks[$provider['callbacks']['url_rewrite']] = NULL; + if (isset($provider['file'])) { + require_once DRUPAL_ROOT . '/' . $provider['file']; + } + // Avoid duplicate callback entries. + $callbacks[$provider['callbacks']['url_rewrite']] = TRUE; } } }