Currently, when performing url rewriting, the files containing the language provider functions are always included, instead they should be included only if the language provider actually defines an url rewriter callback.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

plach’s picture

Status: Active » Needs review
Issue tags: +Performance, +Quick fix
FileSize
1.1 KB

The attached patch should fix the issue and slighly improve readability:

+++ modules/locale/locale.module	13 Jul 2010 08:41:55 -0000
@@ -973,13 +973,12 @@ function locale_url_outbound_alter(&$pat
+            $callbacks[$provider['callbacks']['url_rewrite']] = TRUE;

The callbacks array is indexed by the callback function to avoid duplicates, so the actual values are unrelevant: by changing NULL to TRUE we should covey the idea that the callback is actually used also at a first glance.

plach’s picture

#1: language-852524-1.patch queued for re-testing.

plach’s picture

Version: 7.x-dev » 8.x-dev
Issue tags: +Needs backport to D7
oriol_e9g’s picture

Issue resurrected, D8 patch rolled.

plach’s picture

@oriol_e9g:

Since you just rerolled it I think it's fine if you RTBC it, I definitely cannot :)

oriol_e9g’s picture

Status: Needs review » Reviewed & tested by the community

Ok. Only reroll, so...

Dries’s picture

Status: Reviewed & tested by the community » Fixed

Committed to 7.x and 8.x. Thanks.

Status: Fixed » Closed (fixed)
Issue tags: -Performance, -Quick fix, -Needs backport to D7

Automatically closed -- issue fixed for 2 weeks with no activity.