[TYPO3-core] GeneralUtility::inList() and spaces

Gosign | Caspar Stuebs caspar at gosign.de
Wed Jul 10 14:17:37 CEST 2013


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi,

if the function is done like this

return strpos(',' . str_replace(array(' ,', ', '), ',', $list) . ',',
',' . trim($item) . ',') !== FALSE ? TRUE : FALSE;

it just filters the spaces around the commas.

But it works only if there is just one space before and/or after the
comma.

Kind Regards.
Caspar

Am 10.07.2013 13:39, schrieb François Suter:
> Hi,
> 
>> Of course you're right Xavier. I only thought in terms of
>> database fields, but this is of course a multipurpose function
>> hence this would be breaking.
>> 
>> I fear we're back to the start again.:-(
> 
> I just chatted with Xavier.
> 
> After turning the thing around, he suggested to simply make the 
> str_replace suggested by Bernd at the place where requestUpdate is 
> handled and not inside inList.
> 
> In this case, it is okay, since spaces cannot be expected inside 
> requestUpdate (as it is a list of TCA fields, no spaces in the
> names).
> 
> Cheers
> 

- -- 

** NEUE POSTADRESSE ** NEUE TELEFONNUMMER **

We web heroes: www.dkms.de
We web pickles: www.kuehne.de
We web wwf: www.saveaswwf.com (ADC Grand Prix, Cannes Gold Lion)
We web afrika: www.operndorf-afrika.com
We web pink: www.bebe-onlinewg.de (Deutscher Mediapreis, Neptun Award)
We web green: www.greenpeace-hamburg.de (Greenpeace Wally Award)

Gosign media. GmbH | We web ideas.
Langenfelder Damm 67 Gewerbehof | 22525 Hamburg
Telefon (0 40) 609 40 79 -0

Handelsregister AG HH HRB 112197 | Geschäftsführung Bert Gogolin
Greenpeace energy: Gosign läuft mit ehrlichem Strom.
GLS Bank: Gosign wirtschaftet mit Gewissen.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.19 (MingW32)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iEYEARECAAYFAlHdUOEACgkQBN8gVNLcSL7k3wCfe/xKFuWmKayCQuQyfi+Hsn17
w9kAnimXwRszRy2EWB6Av+AmxHKdOP3L
=iHe+
-----END PGP SIGNATURE-----


More information about the TYPO3-team-core mailing list