- Patch #852524 by plach, oriol_e9g: include language provider files only when they are needed.
parent
a08405829e
commit
afacb52295
|
@ -977,13 +977,12 @@ function locale_url_outbound_alter(&$path, &$options, $original_path) {
|
||||||
$negotiation = variable_get("language_negotiation_$type", array());
|
$negotiation = variable_get("language_negotiation_$type", array());
|
||||||
|
|
||||||
foreach ($negotiation as $id => $provider) {
|
foreach ($negotiation as $id => $provider) {
|
||||||
|
if (isset($provider['callbacks']['url_rewrite'])) {
|
||||||
if (isset($provider['file'])) {
|
if (isset($provider['file'])) {
|
||||||
require_once DRUPAL_ROOT . '/' . $provider['file'];
|
require_once DRUPAL_ROOT . '/' . $provider['file'];
|
||||||
}
|
}
|
||||||
|
|
||||||
// Avoid duplicate callback entries.
|
// Avoid duplicate callback entries.
|
||||||
if (isset($provider['callbacks']['url_rewrite'])) {
|
$callbacks[$provider['callbacks']['url_rewrite']] = TRUE;
|
||||||
$callbacks[$provider['callbacks']['url_rewrite']] = NULL;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue