[TYPO3-core] RFC #14989: Code cleanup: Use TYPO3_REQUESTTYPE consistently for CLI calls detection
Thorsten Kahler
thorsten.kahler at dkd.de
Sat Jul 3 23:24:13 CEST 2010
schrieb François Suter am 03.07.10 17:05:
> This is an SVN patch request.
>
> Type: Code cleanup
>
> Bugtracker references:
> http://bugs.typo3.org/view.php?id=14989
>
> Branches:
> Trunk
>
> Problem:
> Throughout the core, a CLI call is identified using the following test:
>
> defined('TYPO3_cliMode') && TYPO3_cliMode
>
> although t3lib/config_default.php harmonizes all request types into a
> single constant called TYPO3_REQUESTTYPE. This means the above test can
> be replaced by:
>
> TYPO3_REQUESTTYPE & TYPO3_REQUESTTYPE_CLI
>
> to be consistent.
>
> Solution:
> Replace tests as indicated above
>
> Notes:
> 1) an exception was made for 2 t3lib_div methods, because we cannot be
> sure that t3lib/config_default.php has been called beforehand, so
> TYPO3_REQUESTTYPE may not be defined. A comment has been added to that
> effect.
> 2) full scenarios for testing are in the bug tracker entry
>
+1 from my by reading and testing.
Cheers,
Thorsten
--
Thorsten Kahler
thorsten.kahler at dkd.de
More information about the TYPO3-team-core
mailing list