Feature #17035 » 0005064_4.4trunk-rev6791.patch
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
|
||
);
|
||
}
|
||
/**
|
||
... | ... | |
unset($GLOBALS['TSFE']->additionalHeaderData['JSImgCode']);
|
||
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')
|
||
) {
|
||
// Storing the JSCode and JSImgCode vars...
|
||
$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
|
||
$GLOBALS['TSFE']->divSection .= '<!--TDS_' . $GLOBALS['TSFE']->config['INTincScript_ext']['divKey'] . '-->';
|
||
} else {
|
||
... | ... | |
}
|
||
} elseif ($GLOBALS['TSFE']->config['config']['removeDefaultJS'] === 'external') {
|
||
// put default and inlineJS in external file
|
||
$pageRenderer->addJsFile(TSpagegen::inline2TempFile($scriptJsCode . $inlineJS, 'js'), 'text/javascript', $GLOBALS['TSFE']->config['config']['minifyJS']);
|
||
$pageRenderer->addJsFile(
|
||
TSpagegen::inline2TempFile(
|
||
$scriptJsCode . $inlineJS . ( ($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'
|
||
),
|
||
'text/javascript',
|
||
$GLOBALS['TSFE']->config['config']['minifyJS']
|
||
);
|
||
if ($GLOBALS['TSFE']->config['config']['removeAdditionalJS'] == 'external') {
|
||
$GLOBALS['TSFE']->additionalHeaderData['JSImgCode'] = '';
|
||
$GLOBALS['TSFE']->additionalHeaderData['JSCode'] = '';
|
||
}
|
||
if ($inlineFooterJs) {
|
||
$pageRenderer->addJsFooterFile(TSpagegen::inline2TempFile($inlineFooterJs, 'js'), 'text/javascript', $GLOBALS['TSFE']->config['config']['minifyJS']);
|
||
}
|
- « Previous
- 1
- 2
- 3
- Next »