Closed (fixed)
Project:
Custom Search
Version:
7.x-1.x-dev
Component:
Code
Priority:
Minor
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
30 Mar 2011 at 11:39 UTC
Updated:
27 Apr 2011 at 12:21 UTC
Hi. I'm developing a site with two languages where one language is currently disabled. This causes search path to change from eg. /en/search to simply /search. However custom_search puts language prefix even though it is not needed. I took the time and fixed it. Not 100% sure if this is the way to do it but I haven't encountered any problems so far.
Change line no.# 389 in custom_search.module from:
$base_redirect = $GLOBALS['base_url'] . '/' . $GLOBALS['language']->prefix;
to:
$languages = language_list('enabled');
$languages = $languages[1];
$base_redirect = $GLOBALS['base_url'] . '/';
if (count($languages) > 1) $base_redirect .= $GLOBALS['language']->prefix;Cheers.
Comments
Comment #1
jdanthinne commentedYou're right, thanks!
Pushed to dev.
Comment #2
metalinspired commentedGlad I could help. Cheers.