Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on May 6th, 2012  |  syntax: None  |  size: 0.87 KB  |  hits: 14  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. diff --git strongarm.module strongarm.module
  2. index fb44e28..9f50be6 100644
  3. --- strongarm.module
  4. +++ strongarm.module
  5. @@ -14,6 +14,17 @@ function strongarm_init() {
  6.    // weighted even lower than strongarm (which is a superlightweight -1000)
  7.    // rely on $_GET['q'] or 'site_frontpage' in hook_init().
  8.    $_GET['q'] = request_path();
  9. +
  10. +  // The above workaround conflicts with the language prefix language selection
  11. +  // method because it reintroduces the path prefix which had previously been
  12. +  // removed by locale_language_from_url().
  13. +  // We need to strip possible language prefix from path that can exist for
  14. +  // multilingual sites.
  15. +  if (drupal_multilingual() && function_exists('language_url_split_prefix')) {
  16. +    global $language_url;
  17. +    list ($language, $_GET['q']) = language_url_split_prefix($_GET['q'], array($language_url));
  18. +  }
  19. +
  20.    drupal_path_initialize();
  21.  }