[BUGFIX] Load CSH Manual by default
[Packages/TYPO3.CMS.git] / typo3 / sysext / core / Classes / Core / GlobalDebugFunctions.php
1 <?php
2
3 // Simple debug function which prints output immediately
4 function xdebug($var = '', $debugTitle = 'xdebug')
5 {
6 // If you wish to use the debug()-function, and it does not output something,
7 // please edit the IP mask in TYPO3_CONF_VARS
8 if (!\TYPO3\CMS\Core\Utility\GeneralUtility::cmpIP(\TYPO3\CMS\Core\Utility\GeneralUtility::getIndpEnv('REMOTE_ADDR'), $GLOBALS['TYPO3_CONF_VARS']['SYS']['devIPmask'])) {
9 return;
10 }
11 \TYPO3\CMS\Core\Utility\DebugUtility::debug($var, $debugTitle);
12 }
13 // Debug function which calls $GLOBALS['error'] error handler if available
14 function debug($variable = '', $name = '*variable*', $line = '*line*', $file = '*file*', $recursiveDepth = 3, $debugLevel = E_DEBUG)
15 {
16 // If you wish to use the debug()-function, and it does not output something,
17 // please edit the IP mask in TYPO3_CONF_VARS
18 if (!\TYPO3\CMS\Core\Utility\GeneralUtility::cmpIP(\TYPO3\CMS\Core\Utility\GeneralUtility::getIndpEnv('REMOTE_ADDR'), $GLOBALS['TYPO3_CONF_VARS']['SYS']['devIPmask'])) {
19 return;
20 }
21 if (is_object($GLOBALS['error']) && @is_callable(array($GLOBALS['error'], 'debug'))) {
22 $GLOBALS['error']->debug($variable, $name, $line, $file, $recursiveDepth, $debugLevel);
23 } else {
24 $title = $name === '*variable*' ? '' : $name;
25 $group = $line === '*line*' ? NULL : $line;
26 \TYPO3\CMS\Core\Utility\DebugUtility::debug($variable, $title, $group);
27 }
28 }
29 function debugBegin()
30 {
31 if (is_object($GLOBALS['error']) && @is_callable(array($GLOBALS['error'], 'debugBegin'))) {
32 $GLOBALS['error']->debugBegin();
33 }
34 }
35 function debugEnd()
36 {
37 if (is_object($GLOBALS['error']) && @is_callable(array($GLOBALS['error'], 'debugEnd'))) {
38 $GLOBALS['error']->debugEnd();
39 }
40 }
41
42 ?>