[TYPO3-core] RFC: Change setDBinit in config_default from array to string, enable textareas in Install Tool

Michael Stucki michael at typo3.org
Sat Mar 18 19:30:43 CET 2006


Hi Karsten,

> On Wednesday 08 March 2006 12:03, Michael Stucki wrote:
>> It changes setDBinit (introduced by Karsten a few weeks ago) from an
>> array to a string which will be exploded by newlines.
>>
>> To make this useable, I have also changed the Install Tool to support
>> textareas when the comment starts with "string (textarea)".
> 
> Have you ever tried to insert two lines into such a textarea? I just did,
> and it did not work, whereas for one line it worked. (Too bad I didn't
> really try earlier :( )

Honestly but no :-(
I just checked if the new field appears, but since I don't need setDBinit
for myself, I didn't write anything into the field...

> There is this method in class.t3lib_install.php, named
> checkForBadString(), that rejects any value that contains chr(10) or
> chr(13). Now guess what, the values sent from the all configuration screen
> are checked with this, so a textarea with a newline in it will never be
> written to localconf.php... (the call is in setValueInLocalconfFile(),
> again in class.t3lib_install.php)

I have fixed that now. The Install Tool will now replace linebreaks with a
PHP command "'.chr(10).'" which is still a newline but written on one line.

It is not that beautiful but works for now, and it can be enhanced in future
so that the parser understands real linebreaks without loosing the
compatibility.

> I am not attaching a fix, as there surely was a reason for this check
> (think about names of binaries being input). Please have a look at this.

I did so now. Please check.

- michael
-- 
Use a newsreader! Check out
http://typo3.org/community/mailing-lists/use-a-news-reader/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: multiline.diff
Type: text/x-diff
Size: 4039 bytes
Desc: not available
Url : http://lists.netfielders.de/pipermail/typo3-team-core/attachments/20060318/da004d26/attachment.bin 


More information about the TYPO3-team-core mailing list