[TYPO3-core] RFC: Fix (part of) #7589: FULLTEXT keys are not processed correctly
Michael Stucki
michael at typo3.org
Thu Feb 28 14:29:50 CET 2008
Hi Dmitry,
> I would do one thing differently:
>
> -$parts[1] = preg_replace('/([^ ]+)[ ]+([^ ]+)/', '$1 $2', $parts[1]);
> +$parts[1] = str_replace(' ', ' ', $parts[1]);
>
> $parts[1] = preg_replace('/ {2,}/', ' ', $parts[1]);
>
> It takes care of three spaces. I am not sure of str_replace does. But I do
> not insist on this change.
Good idea, will change. Compared to the old statement, this seems a lot
easier to understand, isn't it? ;-)
> Another thing: are you sure this is correct:
> -$key = str_replace('`', '', $parts[0]);
> +// Field definition
> +$key = $parts[0];
> $total[$table]['fields'][$key] = $parts[1];
>
> You keep backticks around field name. Same thing several line below in the
> patch. Not sure if it is a problem. Likely not.
They are still removed, but it is done at one place for all lines. Have a
look at line 28 of the patch.
- michael
--
Use a newsreader! Check out
http://typo3.org/community/mailing-lists/use-a-news-reader/
More information about the TYPO3-team-core
mailing list