[TYPO3-core] RFC #14989: Code cleanup: Use TYPO3_REQUESTTYPE consistently for CLI calls detection
François Suter
fsu-lists at cobweb.ch
Sat Jul 3 17:05:55 CEST 2010
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
Cheers
--
Francois Suter
Cobweb Development Sarl - http://www.cobweb.ch
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: 14989.diff
URL: <http://lists.typo3.org/pipermail/typo3-team-core/attachments/20100703/d3ba1c65/attachment.asc>
More information about the TYPO3-team-core
mailing list