Closed (won't fix)
Project:
Profile search
Version:
5.x-1.0
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
18 Dec 2008 at 12:30 UTC
Updated:
11 Oct 2011 at 21:12 UTC
Hi.
I've noticed that if you search writing a text with spaces it doesn't find anything. I've looked the code and found that:
function profilesearch_search_form_submit($form_id, $form_values) {
$searchstring = str_replace(" ", "+", $form_values['search']);
return 'profilesearch/'. $searchstring;
}
If you use "$searchstring = str_replace(" ", " ", $form_values['search']);" instead, it works fine. It's like doing nothing. Is there a reason why it is used the replacing?
Bye! And thanks in advance!
Comments
Comment #1
Crell commentedThe replacement there modeled on search.module, and I think is from the original code. There's probably a better way of doing it, to be honest. :-) Patches welcome.
Comment #2
javieras commentedThanks. I've deleted this line "$searchstring = str_replace(" ", "+", $form_values['search']);" till i have time to see another way to do it.
Bye!
Comment #3
bfr commentedNot very realistic that anyone is going to update the 5.x branch anymore.