diff --git a/typo3/sysext/cms/tslib/class.tslib_fe.php b/typo3/sysext/cms/tslib/class.tslib_fe.php index ad2d0b318175e02ff541ab5793aa06989910f35d..a70f57203a8f4b1e7dfa6e885650a0250e5b07bc 100644 --- a/typo3/sysext/cms/tslib/class.tslib_fe.php +++ b/typo3/sysext/cms/tslib/class.tslib_fe.php @@ -3160,23 +3160,25 @@ * @return void * @see INTincScript() */ - protected function INTincScript_process($INTiS_config) { + protected function INTincScript_process($INTiS_config) { $GLOBALS['TT']->push('Split content'); - $INTiS_splitC = explode('<!--INT_SCRIPT.',$this->content); // Splits content with the key. + // Splits content with the key. + $INTiS_splitC = explode('<!--INT_SCRIPT.', $this->content); $this->content = ''; - $GLOBALS['TT']->setTSlogMessage('Parts: '.count($INTiS_splitC)); + $GLOBALS['TT']->setTSlogMessage('Parts: ' . count($INTiS_splitC)); $GLOBALS['TT']->pull(); - foreach($INTiS_splitC as $INTiS_c => $INTiS_cPart) { - if (substr($INTiS_cPart,32,3)=='-->') { // If the split had a comment-end after 32 characters it's probably a split-string - $INTiS_key = 'INT_SCRIPT.'.substr($INTiS_cPart,0,32); - $GLOBALS['TT']->push('Include '.$INTiS_config[$INTiS_key]['file'],''); - $incContent=''; - if (is_array($INTiS_config[$INTiS_key])) { + foreach($INTiS_splitC as $INTiS_c => $INTiS_cPart) { + // If the split had a comment-end after 32 characters it's probably a split-string + if (substr($INTiS_cPart, 32, 3) === '-->') { + $INTiS_key = 'INT_SCRIPT.' . substr($INTiS_cPart, 0, 32); + if (is_array($INTiS_config[$INTiS_key])) { + $GLOBALS['TT']->push('Include ' . $INTiS_config[$INTiS_key]['file'], ''); + $incContent = ''; $INTiS_cObj = unserialize($INTiS_config[$INTiS_key]['cObj']); - /* @var $INTiS_cObj tslib_cObj */ - $INTiS_cObj->INT_include=1; - switch($INTiS_config[$INTiS_key]['type']) { + /* @var $INTiS_cObj tslib_cObj */ + $INTiS_cObj->INT_include = 1; + switch($INTiS_config[$INTiS_key]['type']) { case 'SCRIPT': $incContent = $INTiS_cObj->PHP_SCRIPT($INTiS_config[$INTiS_key]['conf']); break; @@ -3187,15 +3189,21 @@ $incContent = $INTiS_cObj->USER($INTiS_config[$INTiS_key]['conf']); break; case 'POSTUSERFUNC': - $incContent = $INTiS_cObj->callUserFunction($INTiS_config[$INTiS_key]['postUserFunc'], $INTiS_config[$INTiS_key]['conf'], $INTiS_config[$INTiS_key]['content']); + $incContent = $INTiS_cObj->callUserFunction( + $INTiS_config[$INTiS_key]['postUserFunc'], + $INTiS_config[$INTiS_key]['conf'], + $INTiS_config[$INTiS_key]['content'] + ); break; } + $this->content .= $this->convOutputCharset($incContent, 'INC-' . $INTiS_c); + $this->content .= substr($INTiS_cPart, 35); + $GLOBALS['TT']->pull($incContent); + } else { + $this->content .= substr($INTiS_cPart, 35); } - $this->content.= $this->convOutputCharset($incContent,'INC-'.$INTiS_c); - $this->content.= substr($INTiS_cPart,35); - $GLOBALS['TT']->pull($incContent); } else { - $this->content.= ($INTiS_c?'<!--INT_SCRIPT.':'').$INTiS_cPart; + $this->content .= ($INTiS_c ? '<!--INT_SCRIPT.' : '') . $INTiS_cPart; } } } @@ -4767,4 +4775,4 @@ if (defined('TYPO3_MODE') && isset($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLA include_once($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['tslib/class.tslib_fe.php']); } -?> +?> \ No newline at end of file