Project

General

Profile

Feature #17035 » 5064_4.2.patch

Administrator Admin, 2008-04-05 12:51

View differences:

typo3/sysext/cms/tslib/class.tslib_pagegen.php (working copy)
}
}
}
return array(count($functions)? implode(chr(10), $functions) . chr(10) . implode(chr(10), $setEvents) : '', $setBody);
if ($GLOBALS['TSFE']->config['config']['removeDefaultJS']=='external' && $GLOBALS['TSFE']->config['config']['removeAdditionalJS']=='external') {
$GLOBALS['TSFE']->JSCode .= implode(chr(10),$functions);
$functions = array();
}
return array (
(count($functions) || count($setEvents)) ? implode(chr(10), $functions) . chr(10) . implode(chr(10), $setEvents) : '',
$setBody
);
}
/**
......
if (is_array($GLOBALS['TSFE']->config['INTincScript'])) {
// Storing the JSCode and JSImgCode vars...
$GLOBALS['TSFE']->additionalHeaderData['JSCode'] = $GLOBALS['TSFE']->JSCode;
$GLOBALS['TSFE']->additionalHeaderData['JSImgCode'] = $GLOBALS['TSFE']->JSImgCode;
if (!($GLOBALS['TSFE']->config['config']['removeDefaultJS']=='external' && $GLOBALS['TSFE']->config['config']['removeAdditionalJS']=='external')) {
$GLOBALS['TSFE']->additionalHeaderData['JSCode'] = $GLOBALS['TSFE']->JSCode;
$GLOBALS['TSFE']->additionalHeaderData['JSImgCode'] = $GLOBALS['TSFE']->JSImgCode;
}
$GLOBALS['TSFE']->config['INTincScript_ext']['divKey'] = $GLOBALS['TSFE']->uniqueHash();
$GLOBALS['TSFE']->config['INTincScript_ext']['additionalHeaderData'] = $GLOBALS['TSFE']->additionalHeaderData; // Storing the header-data array
$GLOBALS['TSFE']->config['INTincScript_ext']['additionalJavaScript'] = $GLOBALS['TSFE']->additionalJavaScript; // Storing the JS-data array
if (!($GLOBALS['TSFE']->config['config']['removeDefaultJS']=='external' && $GLOBALS['TSFE']->config['config']['removeAdditionalJS']=='external')) {
$GLOBALS['TSFE']->config['INTincScript_ext']['additionalJavaScript'] = $GLOBALS['TSFE']->additionalJavaScript; // Storing the JS-data array
}
$GLOBALS['TSFE']->config['INTincScript_ext']['additionalCSS'] = $GLOBALS['TSFE']->additionalCSS; // Storing the Style-data array
$GLOBALS['TSFE']->additionalHeaderData = array('<!--HD_'.$GLOBALS['TSFE']->config['INTincScript_ext']['divKey'].'-->'); // Clearing the array
......
} elseif ($GLOBALS['TSFE']->config['config']['removeDefaultJS']==='external') {
// put default and inlineJS in external file
$GLOBALS['TSFE']->content.= TSpagegen::inline2TempFile($_scriptCode.$_inlineJS, 'js');
$GLOBALS['TSFE']->content.= TSpagegen::inline2TempFile(
$_scriptCode.
( ($GLOBALS['TSFE']->config['config']['removeAdditionalJS']=='external') ?
(chr(10).
implode($GLOBALS['TSFE']->additionalJavaScript,chr(10)) . chr(10).
$GLOBALS['TSFE']->JSCode . chr(10).
$GLOBALS['TSFE']->JSImgCode
) :
''
),
'js'
);
if ($GLOBALS['TSFE']->config['config']['removeAdditionalJS']=='external') {
$GLOBALS['TSFE']->additionalHeaderData['JSImgCode']='';
$GLOBALS['TSFE']->additionalHeaderData['JSCode']='';
}
} else {
// include only inlineJS
$GLOBALS['TSFE']->content.='
(2-2/3)