Bug #23272 » 15242_v2.diff
typo3/template.php (working copy) | ||
---|---|---|
// Initializes the page rendering object:
|
||
$this->getPageRenderer();
|
||
// Only set the backPath if it is currently empty. May already be set by subclass.
|
||
if (!$this->backPath) {
|
||
$this->backPath = $GLOBALS['BACK_PATH'];
|
||
}
|
||
// Setting default scriptID:
|
||
if (($temp_M = (string) t3lib_div::_GET('M')) && $GLOBALS['TBE_MODULES']['_PATHS'][$temp_M]) {
|
||
$this->scriptID = preg_replace('/^.*\/(sysext|ext)\//', 'ext/', $GLOBALS['TBE_MODULES']['_PATHS'][$temp_M] . 'index.php');
|
||
... | ... | |
function addStyleSheetDirectory($path) {
|
||
// calculation needed, when TYPO3 source is used via a symlink
|
||
// absolute path to the stylesheets
|
||
$filePath = dirname(t3lib_div::getIndpEnv('SCRIPT_FILENAME')) . '/' . $GLOBALS['BACK_PATH'] . $path;
|
||
$filePath = dirname(t3lib_div::getIndpEnv('SCRIPT_FILENAME')) . '/' . $this->backPath . $path;
|
||
// clean the path
|
||
$resolvedPath = t3lib_div::resolveBackPath($filePath);
|
||
// read all files in directory and sort them alphabetically
|
||
$files = t3lib_div::getFilesInDir($resolvedPath, 'css', FALSE, 1);
|
||
foreach ($files as $file) {
|
||
$this->pageRenderer->addCssFile($GLOBALS['BACK_PATH'] . $path . $file, 'stylesheet', 'all');
|
||
$this->pageRenderer->addCssFile($this->backPath . $path . $file, 'stylesheet', 'all');
|
||
}
|
||
}
|
||
... | ... | |
class frontendDoc extends template {
|
||
/**
|
||
* Constructor for frontendDoc. Sets up backPath and calls parent constructor.
|
||
*/
|
||
public function __construct() {
|
||
$this->getPageRenderer();
|
||
$this->backPath = $GLOBALS['TSFE']->backPath = TYPO3_mainDir;
|
||
$this->pageRenderer->setBackPath($this->backPath);
|
||
parent::__construct();
|
||
}
|
||
/**
|
||
* Gets instance of PageRenderer
|
||
*
|
||
* @return t3lib_PageRenderer
|
||
... | ... | |
*/
|
||
public function insertHeaderData() {
|
||
$this->backPath = $GLOBALS['TSFE']->backPath = TYPO3_mainDir;
|
||
$this->pageRenderer->setBackPath($this->backPath);
|
||
$this->docStyle();
|
||
// add applied JS/CSS to $GLOBALS['TSFE']
|
- « Previous
- 1
- 2
- Next »