Bug #23272 » 15242.diff

Administrator Admin, 2010-07-26 22:51

View differences:

typo3/template.php (working copy)
253 253

  
254 254
			// Initializes the page rendering object:
255 255
		$this->getPageRenderer();
256
		$this->backPath = $GLOBALS['BACK_PATH'];
256 257

  
257 258
			// Setting default scriptID:
258 259
		if (($temp_M = (string) t3lib_div::_GET('M')) && $GLOBALS['TBE_MODULES']['_PATHS'][$temp_M]) {
......
1107 1108
	function addStyleSheetDirectory($path) {
1108 1109
			// calculation needed, when TYPO3 source is used via a symlink
1109 1110
			// absolute path to the stylesheets
1110
		$filePath = dirname(t3lib_div::getIndpEnv('SCRIPT_FILENAME')) . '/' . $GLOBALS['BACK_PATH'] . $path;
1111
		$filePath = dirname(t3lib_div::getIndpEnv('SCRIPT_FILENAME')) . '/' . $this->backPath . $path;
1111 1112
			// clean the path
1112 1113
		$resolvedPath = t3lib_div::resolveBackPath($filePath);
1113 1114
			// read all files in directory and sort them alphabetically
1114 1115
		$files = t3lib_div::getFilesInDir($resolvedPath, 'css', FALSE, 1);
1115 1116
		foreach ($files as $file) {
1116
			$this->pageRenderer->addCssFile($GLOBALS['BACK_PATH'] . $path . $file, 'stylesheet', 'all');
1117
			$this->pageRenderer->addCssFile($this->backPath . $path . $file, 'stylesheet', 'all');
1117 1118
		}
1118 1119
	}
1119 1120

  
......
2263 2264
class frontendDoc extends template {
2264 2265

  
2265 2266
	/**
2267
	 * Constructor for frontendDoc. Sets up backPath and calls parent constructor.
2268
	 */
2269
	public function __construct() {
2270
		$this->getPageRenderer();
2271
		$this->backPath = $GLOBALS['TSFE']->backPath = TYPO3_mainDir;
2272
		$this->pageRenderer->setBackPath($this->backPath);
2273

  
2274
		parent::__construct();
2275
	}
2276

  
2277
	/**
2266 2278
	 * Gets instance of PageRenderer
2267 2279
	 *
2268 2280
	 * @return	t3lib_PageRenderer
......
2282 2294
	 */
2283 2295
	public function insertHeaderData() {
2284 2296

  
2285
		$this->backPath = $GLOBALS['TSFE']->backPath = TYPO3_mainDir;
2286
		$this->pageRenderer->setBackPath($this->backPath);
2287 2297
		$this->docStyle();
2288 2298

  
2289 2299
			// add applied JS/CSS to $GLOBALS['TSFE']
(1-1/2)