Project

General

Profile

Bug #17563 ยป fix_csConvObj_not_availiabel.txt

Administrator Admin, 2007-08-27 16:55

 
Index: C:/workspace/katadyn/rtehtmlarea/class.tx_rtehtmlarea_base.php
===================================================================
--- C:/workspace/katadyn/rtehtmlarea/class.tx_rtehtmlarea_base.php (revision 6348)
+++ C:/workspace/katadyn/rtehtmlarea/class.tx_rtehtmlarea_base.php (working copy)
@@ -994,7 +994,7 @@
// Builing JS array of default font sizes
$HTMLAreaFontSizes = array();
- if (is_object($TSFE)) {
+ if (is_object($TSFE) && is_object($TSFE->csConvObj)) {
$HTMLAreaFontSizes[0] = $TSFE->csConvObj->conv($TSFE->getLLL('No size',$this->LOCAL_LANG), $TSFE->labelsCharset, $TSFE->renderCharset);
} else {
$HTMLAreaFontSizes[0] = $LANG->getLL('No size');
@@ -1052,7 +1052,7 @@
if($HTMLAreaParagraphIndex) {
$HTMLAreaJSParagraph .= ',';
}
- if (is_object($TSFE)) {
+ if (is_object($TSFE) && is_object($TSFE->csConvObj)) {
$HTMLAreaJSParagraph .= '
"' . $TSFE->csConvObj->conv($TSFE->getLLL($PStyleLabel,$this->LOCAL_LANG), $TSFE->labelsCharset, $TSFE->renderCharset) . '" : "' . $PStyleItem . '"';
@@ -1091,7 +1091,7 @@
$HTMLAreaFontname['nofont'] = '
"' . $fontName . '" : "' . $this->cleanList($fontValue) . '"';
$defaultFontFacesList = 'nofont,';
- if (is_object($TSFE)) {
+ if (is_object($TSFE) && is_object($TSFE->csConvObj)) {
$HTMLAreaFontname['nofont'] = '
"' . $TSFE->csConvObj->conv($TSFE->getLLL('No font',$this->LOCAL_LANG), $TSFE->labelsCharset, $TSFE->renderCharset) . '" : ""';
} else {
@@ -1178,7 +1178,7 @@
reset($RTEProperties['colors.']);
while(list($colorName,$conf)=each($RTEProperties['colors.'])) {
$colorName=substr($colorName,0,-1);
- if (is_object($TSFE)) {
+ if (is_object($TSFE) && is_object($TSFE->csConvObj)) {
$string = $TSFE->csConvObj->conv($TSFE->sL(trim($conf['name'])), $TSFE->renderCharset, $TSFE->metaCharset);
$string = str_replace('"', '\"', str_replace('\\\'', '\'', $string));
$string = $this->feJScharCode($string);
@@ -1312,7 +1312,7 @@
reset($RTEProperties['classes.']);
while(list($className,$conf)=each($RTEProperties['classes.'])) {
$className = substr($className,0,-1);
- if (is_object($TSFE)) {
+ if (is_object($TSFE) && is_object($TSFE->csConvObj)) {
$string = $TSFE->csConvObj->conv($TSFE->sL(trim($conf['name'])), $TSFE->renderCharset, $TSFE->metaCharset);
$string = str_replace('"', '\"', str_replace('\\\'', '\'', $string));
$string = $this->feJScharCode($string);
@@ -1343,7 +1343,7 @@
$linebreak = $GLOBALS['TYPO3_CONF_VARS']['EXTCONF'][$this->ID]['enableCompressedScripts'] ? '' : chr(10);
$JSLanguageArray .= 'var HTMLArea_langArray = new Array();' . $linebreak;
$JSLanguageArray .= 'HTMLArea_langArray = { ' . $linebreak;
- if(is_object($TSFE)) {
+ if(is_object($TSFE) && is_object($TSFE->csConvObj)) {
$JSLanguageArray = $TSFE->csConvObj->conv($JSLanguageArray, 'iso-8859-1', $this->OutputCharset);
} else {
$JSLanguageArray = $LANG->csConvObj->conv($JSLanguageArray, 'iso-8859-1', $this->OutputCharset);
@@ -1353,7 +1353,7 @@
$subArraysIndex = 0;
foreach($subArrays as $labels) {
$JSLanguageArray .= (($subArraysIndex++)?',':'') . $labels . ': {' . $linebreak;
- if(is_object($TSFE)) {
+ if(is_object($TSFE) && is_object($TSFE->csConvObj)) {
$LOCAL_LANG = $TSFE->readLLfile(t3lib_extMgm::extPath($this->ID).'htmlarea/locallang_' . $labels . '.php');
if($this->typoVersion >= 3007000 ) {
$TSFE->csConvObj->convArray($LOCAL_LANG['default'], 'iso-8859-1', $this->OutputCharset);
@@ -1381,14 +1381,14 @@
foreach ( $LOCAL_LANG[$this->language] as $labelKey => $labelValue ) {
$JSLanguageArray .= (($index++)?',':'') . '"' . $labelKey . '":"' . str_replace('"', '\"', $labelValue) . '"' . $linebreak;
}
- if(is_object($TSFE)) {
+ if(is_object($TSFE) && is_object($TSFE->csConvObj)) {
$JSLanguageArray .= $TSFE->csConvObj->conv(' }' . chr(10), 'iso-8859-1', $this->OutputCharset);
} else {
$JSLanguageArray .= $LANG->csConvObj->conv(' }' . chr(10), 'iso-8859-1', $this->OutputCharset);
}
}
- if(is_object($TSFE)) {
+ if(is_object($TSFE) && is_object($TSFE->csConvObj)) {
$JSLanguageArray .= $TSFE->csConvObj->conv(' }' . chr(10), 'iso-8859-1', $this->OutputCharset);
} else {
$JSLanguageArray .= $LANG->csConvObj->conv(' }' . chr(10), 'iso-8859-1', $this->OutputCharset);
@@ -1530,7 +1530,7 @@
global $TSFE, $LANG;
$linebreak = $GLOBALS['TYPO3_CONF_VARS']['EXTCONF'][$this->ID]['enableCompressedScripts'] ? '' : chr(10);
- if(is_object($TSFE)) {
+ if(is_object($TSFE) && is_object($TSFE->csConvObj)) {
$LOCAL_LANG = $TSFE->readLLfile(t3lib_extMgm::extPath($this->ID).'htmlarea/plugins/' . $plugin . '/locallang.php');
if($this->typoVersion >= 3007000 ) {
if(!empty($LOCAL_LANG['default'])) $TSFE->csConvObj->convArray($LOCAL_LANG['default'], 'iso-8859-1', $this->OutputCharset);
@@ -1558,7 +1558,7 @@
$JSLanguageArray .= 'var ' . $plugin . '_langArray = new Array();' . $linebreak;
$JSLanguageArray .= $plugin . '_langArray = {' . $linebreak;
- if(is_object($TSFE)) {
+ if(is_object($TSFE) && is_object($TSFE->csConvObj)) {
$JSLanguageArray = $TSFE->csConvObj->conv($JSLanguageArray, 'iso-8859-1', $this->OutputCharset);
} else {
$JSLanguageArray = $LANG->csConvObj->conv($JSLanguageArray, 'iso-8859-1', $this->OutputCharset);
@@ -1569,7 +1569,7 @@
$JSLanguageArray .= (($index++)?',':'') . '"' . $labelKey . '":"' . str_replace('"', '\"', $labelValue) . '"' . $linebreak;
}
- if(is_object($TSFE)) {
+ if(is_object($TSFE) && is_object($TSFE->csConvObj)) {
$JSLanguageArray .= $TSFE->csConvObj->conv(' }' . chr(10), 'iso-8859-1', $this->OutputCharset);
} else {
$JSLanguageArray .= $LANG->csConvObj->conv(' }' . chr(10), 'iso-8859-1', $this->OutputCharset);
@@ -1828,7 +1828,7 @@
if (is_array($array[$key])) {
$this->convArray($array[$key],$fromCS,$toCS,$useEntityForNoChar);
} else {
- if(is_object($TSFE)) {
+ if(is_object($TSFE) && is_object($TSFE->csConvObj)) {
$array[$key] = $TSFE->csConvObj->conv($array[$key],$fromCS,$toCS,$useEntityForNoChar);
} else {
$array[$key] = $LANG->csConvObj->conv($array[$key],$fromCS,$toCS,$useEntityForNoChar);
    (1-1/1)