[TYPO3-core] RFC #14313: Class prefix problem in getUserObj and callUserFunction (t3lib_div)

Andreas Kiessling kiessling at pluspol.info
Fri Jan 21 00:31:00 CET 2011


Hi Peter,

i already had something like this in mind and even some lines of code, 
but thought this change would be too big for the RFC.

Attached is v3 with your suggestions.

Effects of that patch:
- Methods getUserFuncClassPrefix from matchcondition are probably not 
needed anymore, could be deprecated
- Names for services can not be prefixed with Tx_, user_, User or the 
configured FE userFuncClassPrefix (previously only tx_ was checked)

I am unsure about these parts:
- Clearing $TYPO3_CONF_VARS['FE']['userFuncClassPrefix'] or unsetting it 
in localconf.php means every prefix is allowed in the frontend. This is 
somehow in line with the code parts from callUserFunction and 
getUserObj, because if they are called with $checkPrefix set to FALSE 
the prefix check is skipped. The early return at that point isn't nice, 
but wrapping the rest of the code wouldn't be either.
- I also adjusted some debug messages, but since user_ is set as default 
this could result in a messages like this: Function/class 'abc' was not 
prepended with 'tx_', 'Tx_', 'user_', 'User_' or 'user_'

I will apply the patch to a bigger site tomorrow, shouldn't break 
anything ;)

Regards,
Andreas

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: 14313_v3.patch
URL: <http://lists.typo3.org/pipermail/typo3-team-core/attachments/20110121/9e283527/attachment-0001.txt>


More information about the TYPO3-team-core mailing list