0013690.patch

Administrator Admin, 2010-02-27 19:04

Download (1.77 KB)

View differences:

typo3/template.php (Arbeitskopie)
2146 2146
class frontendDoc extends template {
2147 2147

  
2148 2148
	/**
2149
	 * Gets instance of PageRenderer
2150
	 *
2151
	 * @return	t3lib_PageRenderer
2152
	 */
2153
	public function getPageRenderer() {
2154
		if (!isset($this->pageRenderer)) {
2155
			$this->pageRenderer = $GLOBALS['TSFE']->getPageRenderer();
2156
		}
2157
		return $this->pageRenderer;
2158
	}
2159

  
2160
	/**
2149 2161
	 * Used in the frontend context to insert header data via TSFE->additionalHeaderData.
2150 2162
	 * Mimics header inclusion from template->startPage().
2151 2163
	 *
......
2153 2165
	 */
2154 2166
	public function insertHeaderData() {
2155 2167

  
2156
		/** @var $pageRenderer t3lib_PageRenderer */
2157
		$pageRenderer = $GLOBALS['TSFE']->getPageRenderer();
2158

  
2159 2168
		$this->backPath = $GLOBALS['TSFE']->backPath = TYPO3_mainDir;
2160 2169
		$this->pageRenderer->setBackPath($this->backPath);
2161 2170
		$this->docStyle();
2162 2171

  
2163 2172
			// add applied JS/CSS to $GLOBALS['TSFE']
2164 2173
		if ($this->JScode) {
2165
			$pageRenderer->addHeaderData($this->JScode);
2174
			$this->pageRenderer->addHeaderData($this->JScode);
2166 2175
		}
2167 2176
		if (count($this->JScodeArray)) {
2168 2177
			foreach ($this->JScodeArray as $name => $code) {
2169
				$pageRenderer->addJsInlineCode($name, $code);
2178
				$this->pageRenderer->addJsInlineCode($name, $code);
2170 2179
			}
2171 2180
		}
2172

  
2173
		if ($this->addPrototype) {
2174
			$pageRenderer->loadPrototype();
2175
		}
2176
		if ($this->addScriptaculous) {
2177
			$pageRenderer->loadScriptaculous();
2178
		}
2179
		if ($this->addExtJS) {
2180
			$pageRenderer->loadExtJs();
2181
		}
2182
		if ($this->inlineLanguageLabels) {
2183
			$pageRenderer->addInlineLanguageLabelArray($this->inlineLanguageLabels);
2184
		}
2185
		if ($this->inlineSettings) {
2186
			$pageRenderer->addInlineSettingArray($this->inlineSettings);
2187
		}
2188 2181
	}
2189 2182
}
2190 2183