Fixed bug #17205: htmlArea RTE: Remove Image button when images are not enabled
authorStanislas Rolland <typo3@sjbr.ca>
Sat, 22 Jan 2011 05:23:59 +0000 (05:23 +0000)
committerStanislas Rolland <typo3@sjbr.ca>
Sat, 22 Jan 2011 05:23:59 +0000 (05:23 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@10240 709f56b5-9817-0410-a4d7-c38de5d9e867

ChangeLog
typo3/sysext/rtehtmlarea/ChangeLog
typo3/sysext/rtehtmlarea/extensions/DefaultImage/class.tx_rtehtmlarea_defaultimage.php
typo3/sysext/rtehtmlarea/extensions/TYPO3Image/class.tx_rtehtmlarea_typo3image.php

index 1ac65cb..1a30a82 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -64,6 +64,7 @@
        * Follow-up to bug #17157: htmlArea RTE: Not enabled in various browser/system combinations
        * Fixed bug #17187: CSH tooltip does not render correctly for allowed Excludefields
        * Fixed bug #17160: htmlArea RTE: Link editing problems in Internet Explorer
+       * Fixed bug #17205: htmlArea RTE: Remove Image button when images are not enabled
 
 2011-01-21  Susanne Moog  <typo3@susanne-moog.de>
 
index 8b53b50..19366b9 100644 (file)
@@ -2,7 +2,7 @@
 
        * Fixed bug #16975: htmlArea RTE: Use parentNode rather than parentElement
        * Follow-up to bug #17157: htmlArea RTE: Not enabled in various browser/system combinations
-       * Fixed bug #17160: htmlArea RTE: Link editing problems in Internet Explorer
+       * Fixed bug #17205: htmlArea RTE: Remove Image button when images are not enabled
 
 2011-01-20  Stanislas Rolland  <typo3@sjbr.ca>
 
index c29af0c..5ff4717 100644 (file)
@@ -45,6 +45,12 @@ class tx_rtehtmlarea_defaultimage extends tx_rtehtmlarea_api {
                'image' => 'InsertImage',
                );
 
+       public function main($parentObject) {
+                       // Check if this should be enabled based on extension configuration and Page TSConfig
+                       // The 'Minimal' and 'Typical' default configurations include Page TSConfig that removes images on the way to the database
+               return parent::main($parentObject)
+                       && !($this->thisConfig['proc.']['entryHTMLparser_db.']['tags.']['img.']['allowedAttribs'] == '0' && $this->thisConfig['proc.']['entryHTMLparser_db.']['tags.']['img.']['rmTagIfNoAttrib'] == '1');
+       }
        /**
         * Return JS configuration of the htmlArea plugins registered by the extension
         *
index 794e63e..02e4df4 100644 (file)
@@ -46,9 +46,12 @@ class tx_rtehtmlarea_typo3image extends tx_rtehtmlarea_api {
                );
 
        public function main($parentObject) {
-                       // Check if this should be enabled based on Page TSConfig
-               return parent::main($parentObject) && !$this->thisConfig['disableTYPO3Browsers']
-                               && !(is_array( $this->thisConfig['buttons.']) && is_array($this->thisConfig['buttons.']['image.']) && is_array($this->thisConfig['buttons.']['image.']['TYPO3Browser.']) && $this->thisConfig['buttons.']['image.']['TYPO3Browser.']['disabled']);
+                       // Check if this should be enabled based on extension configuration and Page TSConfig
+                       // The 'Minimal' and 'Typical' default configurations include Page TSConfig that removes images on the way to the database
+               return parent::main($parentObject)
+                       && !($this->thisConfig['proc.']['entryHTMLparser_db.']['tags.']['img.']['allowedAttribs'] == '0' && $this->thisConfig['proc.']['entryHTMLparser_db.']['tags.']['img.']['rmTagIfNoAttrib'] == '1')
+                       && !$this->thisConfig['disableTYPO3Browsers']
+                       && !$this->thisConfig['buttons.']['image.']['TYPO3Browser.']['disabled'];
        }
 
        /**