* Fixed bug #4588: Frontend htmlArea RTE loads global RTE config instead of function...
authorStanislas Rolland <typo3@sjbr.ca>
Thu, 7 Feb 2008 17:49:57 +0000 (17:49 +0000)
committerStanislas Rolland <typo3@sjbr.ca>
Thu, 7 Feb 2008 17:49:57 +0000 (17:49 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@3122 709f56b5-9817-0410-a4d7-c38de5d9e867

ChangeLog
typo3/sysext/rtehtmlarea/ChangeLog
typo3/sysext/rtehtmlarea/pi2/class.tx_rtehtmlarea_pi2.php

index 56f71da..da8fa0c 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,10 @@
 2008-02-08  Jeff Segars  <jeff@webempoweredchurch.org>
 
        * Fixed bug #7449: Frontend editing fails due to undefined method in t3lib_BEfunc
+       
+2008-02-07  Stanislas Rolland  <stanislas.rolland@fructifor.ca>
+
+       * Fixed bug #4588: Frontend htmlArea RTE loads global RTE config instead of function parameter $thisConfig
 
 2008-02-07  Benjamin Mack  <mack@xnos.org>
 
index 0ca820b..6b71993 100644 (file)
@@ -1,3 +1,7 @@
+2008-02-07  Stanislas Rolland  <stanislas.rolland@fructifor.ca>
+
+       * Fixed bug #4588: Frontend htmlArea RTE loads global RTE config instead of function parameter $thisConfig
+
 2008-02-06  Stanislas Rolland  <stanislas.rolland@fructifor.ca>
 
        * Fixed bug #7419: htmlArea RTE: Localization error in Remove Format plugin
index 0010b44..050e7b8 100644 (file)
@@ -49,8 +49,8 @@ class tx_rtehtmlarea_pi2 extends tx_rtehtmlarea_base {
        var $tscPID;
        var $typeVal;
        var $thePid;
-       var $RTEsetup;
-       var $thisConfig;
+       var $RTEsetup = array();
+       var $thisConfig = array();
        var $confValues;
        var $language;
        var $specConf;
@@ -106,11 +106,18 @@ class tx_rtehtmlarea_pi2 extends tx_rtehtmlarea_base {
                
                        // Record "type" field value:
                $this->typeVal = $RTEtypeVal; // TCA "type" value for record
-               unset($this->RTEsetup);
+               
+                       // RTE configuration
                $pageTSConfig = $TSFE->getPagesTSconfig();
-               $this->RTEsetup = $pageTSConfig['RTE.'];
-               $this->thisConfig = $this->RTEsetup['default.'];
-               $this->thisConfig = $this->thisConfig['FE.'];
+               if (is_array($pageTSConfig) && is_array($pageTSConfig['RTE.'])) {
+                       $this->RTEsetup = $pageTSConfig['RTE.'];
+               }
+               
+               if (is_array($thisConfig) && !empty($thisConfig)) {
+                       $this->thisConfig = $thisConfig;
+               } else if (is_array($this->RTEsetup['default.']) && is_array($this->RTEsetup['default.']['FE.'])) {
+                       $this->thisConfig = $this->RTEsetup['default.']['FE.'];
+               }
                
                        // Special configuration (line) and default extras:
                $this->specConf = $specConf;