Fixed bug #14060: htmlArea RTE: Some table operations configuration may cause js...
[Packages/TYPO3.CMS.git] / typo3 / sysext / rtehtmlarea / extensions / TableOperations / class.tx_rtehtmlarea_tableoperations.php
index b1e9fee..20e41b3 100644 (file)
@@ -114,16 +114,18 @@ class tx_rtehtmlarea_tableoperations extends tx_rtehtmlareaapi {
                        if ($disabledFieldsets) {
                                $dialogues = array('table', 'tableproperties', 'rowproperties', 'columnproperties', 'cellproperties');
                                foreach ($dialogues as $dialogue) {
-                                       if (!is_array( $this->thisConfig['buttons.']) || !is_array( $this->thisConfig['buttons.'][$dialogue.'.'])) {
-                                               $registerRTEinJavascriptString .= '
-                               RTEarea['.$RTEcounter.'].buttons.'.$dialogue.' = new Object();
-                               RTEarea['.$RTEcounter.'].buttons.'.$dialogue.'.removeFieldsets = "' . $disabledFieldsets . '";';
-                                       } else if ($this->thisConfig['buttons.'][$dialogue.'.']['removeFieldsets']) {
-                                               $registerRTEinJavascriptString .= '
-                               RTEarea['.$RTEcounter.'].buttons.'.$dialogue.'.removeFieldsets += ",' . $disabledFieldsets . '";';
-                                       } else {
-                                               $registerRTEinJavascriptString .= '
-                               RTEarea['.$RTEcounter.'].buttons.'.$dialogue.'.removeFieldsets = ",' . $disabledFieldsets . '";';
+                                       if (in_array($dialogue, $this->toolbar)) {
+                                               if (!is_array( $this->thisConfig['buttons.']) || !is_array( $this->thisConfig['buttons.'][$dialogue.'.'])) {
+                                                       $registerRTEinJavascriptString .= '
+                                       RTEarea['.$RTEcounter.'].buttons.'.$dialogue.' = new Object();
+                                       RTEarea['.$RTEcounter.'].buttons.'.$dialogue.'.removeFieldsets = "' . $disabledFieldsets . '";';
+                                               } else if ($this->thisConfig['buttons.'][$dialogue.'.']['removeFieldsets']) {
+                                                       $registerRTEinJavascriptString .= '
+                                       RTEarea['.$RTEcounter.'].buttons.'.$dialogue.'.removeFieldsets += ",' . $disabledFieldsets . '";';
+                                               } else {
+                                                       $registerRTEinJavascriptString .= '
+                                       RTEarea['.$RTEcounter.'].buttons.'.$dialogue.'.removeFieldsets = ",' . $disabledFieldsets . '";';
+                                               }
                                        }
                                }
                        }