Bug #24332 » 16735.patch
typo3/backend.php (revision ) | ||
---|---|---|
$componentDirectory = 'components/' . $component . '/';
|
||
$absoluteComponentPath = t3lib_extMgm::extPath($info['extKey']) . $componentDirectory;
|
||
$relativeComponentPath = t3lib_extMgm::extRelPath($info['extKey']) . $componentDirectory;
|
||
$cssFiles = t3lib_div::getFilesInDir($absoluteComponentPath . 'css/');
|
||
if (file_exists($absoluteComponentPath . 'css/loadorder.txt')) {
|
||
//don't allow inclusion outside directory
|
||
$loadOrder = str_replace('../', '', t3lib_div::getURL($absoluteComponentPath . 'css/loadorder.txt'));
|
||
$cssFiles = t3lib_div::trimExplode(LF, $loadOrder, TRUE);
|
||
} else {
|
||
$cssFiles = t3lib_div::getFilesInDir($absoluteComponentPath . 'css/', 'css');
|
||
}
|
||
foreach ($cssFiles as $cssFile) {
|
||
$this->pageRenderer->addCssFile($relativeComponentPath . 'css/' . $cssFile);
|
||
}
|
||
$jsFiles = t3lib_div::getFilesInDir($absoluteComponentPath . 'javascript/');
|
||
if (file_exists($absoluteComponentPath . 'javascript/loadorder.txt')) {
|
||
//don't allow inclusion outside directory
|
||
$loadOrder = str_replace('../', '', t3lib_div::getURL($absoluteComponentPath . 'javascript/loadorder.txt'));
|
||
$jsFiles = t3lib_div::trimExplode(LF, $loadOrder, TRUE);
|
||
} else {
|
||
$jsFiles = t3lib_div::getFilesInDir($absoluteComponentPath . 'javascript/', 'js');
|
||
}
|
||
foreach ($jsFiles as $jsFile) {
|
||
$this->pageRenderer->addJsFile($relativeComponentPath . 'javascript/' . $jsFile);
|
||
}
|