[TYPO3-core] RFC #14989: Code cleanup: Use TYPO3_REQUESTTYPE consistently for CLI calls detection

Peter Foerger pfoerger at gmail.com
Sat Jul 3 21:36:29 CEST 2010


Hi,

François Suter schrieb:
> 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


+1 by reading and testing the scenarios found in BT.

~Peter


More information about the TYPO3-team-core mailing list