[TYPO3-core] RFC #11154: calls to deprecated function makeInstanceClassName in core
Franz Koch
typo.removeformessage at fx-graefix.de
Wed May 20 23:08:21 CEST 2009
Hi Dmitry,
> The following does not make sense:
>
> =============
> - $cls=t3lib_div::makeInstanceClassName('t3lib_htmlmail');
> // Avoid autoloading of t3lib_htmlmail, since it's only a strategy check here:
> - if (class_exists($cls, false)) { // If htmlmail lib is included, then generate a nice HTML-email
> + if (class_exists('t3lib_htmlmail', false)) { // If htmlmail lib is included, then generate a nice HTML-email
> =============
>
> In my opinion, there is no need for this check when we have autoloading. This check was necessary before because this file did not want to include the t3lib_htmlmail class manually. Now the class will never exist because all require_once will be gone and the last parameter to class_exists is false. Therefore the condition is always false and it does not maker any sense. Just instantiate and use t3lib_htmlmail :)
As far as I have seen and understood, the class t3lib_htmlmail should
only be included if a certain TS (or pageTS) setting is set. So it
seemed to me that this TS configuration is checked at some point in the
core and the according class gets included there (haven't searched for
it though). Thus the class would then exist and the check would pass.
If you would remove this check and use the autoloader instead, you would
always have HTMLmails, even if not configured - right?
But as I noted above - I haven't tracked this down. If you are sure that
the check can be dropped without changing the intended behavior I'll
change that in the patch.
--
kind regards,
Franz Koch
---------------------------------------------------
PayPal-Account: 'paypal _at_ elements-net _dot_ de'
---------------------------------------------------
More information about the TYPO3-team-core
mailing list