Project

General

Profile

Bug #22654 » rtehtmlarea_bugfix_14567_trunk.patch

Administrator Admin, 2010-06-16 02:43

View differences:

typo3/sysext/rtehtmlarea/class.tx_rtehtmlarea_base.php (copie de travail)
* =======================================
*/
// Set backPath
$this->backPath = $this->isFrontendEditActive() ? '' : $this->TCEform->backPath;
$this->backPath = $this->TCEform->backPath;
// Get the path to this extension:
$this->extHttpPath = $this->backPath . ($this->isFrontendEditActive() ? t3lib_extMgm::siteRelPath($this->ID) : t3lib_extMgm::extRelPath($this->ID));
$this->extHttpPath = $this->backPath . t3lib_extMgm::extRelPath($this->ID);
// Get the site URL
$this->siteURL = t3lib_div::getIndpEnv('TYPO3_SITE_URL');
// Get the host URL
......
$filename = trim($this->thisConfig['contentCSS']) ? trim($this->thisConfig['contentCSS']) : 'EXT:' . $this->ID . '/res/contentcss/default.css';
$this->addStyleSheet(
'rtehtmlarea-page-style',
($this->isFrontendEditActive() ? '../' : '') . $this->getFullFileName($filename),
$this->getFullFileName($filename),
'htmlArea RTE Content CSS',
'alternate stylesheet'
);
......
if (is_object($this->TCEform->inline) && $this->TCEform->inline->isAjaxCall) {
$this->TCEform->additionalCode_pre[$key] = '<link rel="' . $relation . '" type="text/css" href="' . $href . '" title="' . $title. '" />';
} else {
$this->TCEform->addStyleSheet($key, $href, $title, $relation);
$pageRenderer = $GLOBALS['SOBE']->doc->getPageRenderer();
$pageRenderer->addCssFile($href, $relation, 'screen', $title);
}
}
/**
......
RTEarea[0] = new Object();
RTEarea[0].version = "' . $GLOBALS['TYPO3_CONF_VARS']['EXTCONF'][$this->ID]['version'] . '";
RTEarea[0].editorUrl = "' . $this->extHttpPath . 'htmlarea/";
RTEarea[0].editorCSS = "' . t3lib_div::createVersionNumberedFilename(($this->isFrontendEditActive() ? $this->TCEform->backPath : '') . $this->editorCSS) . '";
RTEarea[0].editorSkin = "' . dirname(($this->isFrontendEditActive() ? $this->TCEform->backPath : '') . $this->editorCSS) . '/";
RTEarea[0].editedContentCSS = "' . t3lib_div::createVersionNumberedFilename(($this->isFrontendEditActive() ? $this->TCEform->backPath : '') . $this->editedContentCSS) . '";
RTEarea[0].editorCSS = "' . t3lib_div::createVersionNumberedFilename($this->editorCSS) . '";
RTEarea[0].editorSkin = "' . dirname($this->editorCSS) . '/";
RTEarea[0].editedContentCSS = "' . t3lib_div::createVersionNumberedFilename($this->editedContentCSS) . '";
RTEarea[0].hostUrl = "' . $this->hostURL . '";
RTEarea[0].enableDebugMode = ' . ($GLOBALS['TYPO3_CONF_VARS']['EXTCONF'][$this->ID]['enableDebugMode'] ? 'true' : 'false') . ';
RTEarea.init = function() {
......
if ($this->is_FE()) {
return ($GLOBALS['TSFE']->absRefPrefix ? $GLOBALS['TSFE']->absRefPrefix : '') . t3lib_div::createVersionNumberedFilename($relativeFilename);
} else {
$filename = t3lib_div::createVersionNumberedFilename(($this->isFrontendEditActive() ? '' : '../' . $this->backPath) . $relativeFilename);
$filename = t3lib_div::createVersionNumberedFilename(($this->isFrontendEditActive() ? '' : ('../' . $this->backPath)) . $relativeFilename);
if ($this->isFrontendEditActive()) {
$filename = preg_replace('/^..\//', '', $filename);
}
......
} else {
if ($compress) {
$compressor = t3lib_div::makeInstance('t3lib_Compressor');
$filename = $compressor->compressJsFile('../' . $this->backPath . $relativeFilename);
$filename = $compressor->compressJsFile('../' . ($this->isFrontendEditActive() ? '' : $this->backPath) . $relativeFilename);
} else {
$filename = t3lib_div::createVersionNumberedFilename('../' . $this->backPath . $relativeFilename);
$filename = t3lib_div::createVersionNumberedFilename(($this->isFrontendEditActive() ? '' : ('../' . $this->backPath)) . $relativeFilename);
}
if ($this->isFrontendEditActive()) {
$filename = preg_replace('/^..\//', '', $filename);
......
$newFilename = ($this->is_FE() ? t3lib_extMgm::siteRelPath($extKey) : $this->backPath . t3lib_extMgm::extRelPath($extKey)) . $local;
}
} elseif (substr($filename,0,1) != '/') {
$newFilename = ($this->is_FE() ? '' : ($this->isFrontendEditActive() ? '' : '../') . $this->backPath) . $filename;
$newFilename = (($this->is_FE() || $this->isFrontendEditActive()) ? '' : ('../' . $this->backPath)) . $filename;
} else {
$newFilename = ($this->is_FE() ? '' : ($this->isFrontendEditActive() ? '' : '../') . $this->backPath) . substr($filename, 1);
$newFilename = (($this->is_FE() || $this->isFrontendEditActive()) ? '' : ('../' . $this->backPath)) . substr($filename, 1);
}
return $newFilename;
}
(3-3/3)