[TYPO3-core] RFC #16107: Bugfix - listNum = 0 not working anymore due to stdWrap changes

JoH asenau info at cybercraft.de
Sun Oct 24 12:22:11 CEST 2010


Susanne Moog wrote:
> On 22.10.2010 23:54, JoH asenau wrote:
>> This is an SVN patch request.
>> 
>> Type: Bugfix
>> 
>> http://bugs.typo3.org/view.php?id=16107
>> 
>> Branches: trunk
>> 
>> Original Problem:
>> Since the stdWrap refactoring import.listNum = 0 does not work
>> anymore and all other functions where = 0 is not meant to be false
>> will fail, too. This is due to a wrong check in function stdWrap,
>> line 4461. If changed from  
>> if ($conf[$functionName] || $conf[$functionProperties]) {
>> to
>> if (isset($conf[$functionName]) || $conf[$functionProperties]) {
>> it works again. I did not test possible other effects of that change
>> at the moment. 
>> 
>> This would have executed boolean stdWrap functions regardless of a
>> possible value 0. 
>> So required = 0 would behave like required = 1.
>> 
>> Solution:
>> The attached patch introduces function types as values of the
>> $stdWrapOrder array instead of the current "1" and checks these
>> types before the stdWrap function gets called.  
>> This makes sure that boolean functions will not be executed when
>> their value is 0, while the rest of the functions will work as
>> before.  
>> 
>> Additionally it gives us more options to do a kind of "syntax check"
>> 
>> Will fix #16110 as well
> 
> Please don't do that. I just noticed this comment after committing
> 16110 ... and I don't think both bugs should be fixed with one patch,
> 16110 hasn't necessarily anything to do with this one.

OK. - new v2 will take care of that.
 
> Question to this patch:
> - $stdWrapDisabledFunctions =
> 'cObject,preUserFunc,stdWrap,preCObject,postCObject,prepend,append,postUserFunc,postUserFuncInt';
> + $stdWrapDisabledFunctions = 'cObject,functionname';
>
> You don't disable the same functions as before, or do you? For example
> prepend and append aren't of type "functionname" and they appeared
> before, does this have a special reason?

it disables functions based on their type instead of their name, namely those of the type "cObject" or "functionname", so basically it does the same as the list before. But I forgot to add "stdWrap" as well. New v2 takes care of that.

Attached is new v2.

Joey

-- 
Wenn man keine Ahnung hat: Einfach mal Fresse halten!
(If you have no clues: simply shut your gob sometimes!)
Dieter Nuhr, German comedian
Xing: http://contact.cybercraft.de
Twitter: http://twitter.com/bunnyfield
TYPO3 cookbook (2nd edition): http://www.typo3experts.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: tslib_content_v2.diff
Type: application/octet-stream
Size: 10962 bytes
Desc: not available
URL: <http://lists.typo3.org/pipermail/typo3-team-core/attachments/20101024/55cc92c7/attachment.obj>


More information about the TYPO3-team-core mailing list