Fixed bug #14905: htmlArea RTE: Image dialogue shows tab "Current picture" when there...
authorStanislas Rolland <typo3@sjbr.ca>
Tue, 29 Jun 2010 16:20:49 +0000 (16:20 +0000)
committerStanislas Rolland <typo3@sjbr.ca>
Tue, 29 Jun 2010 16:20:49 +0000 (16:20 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@8075 709f56b5-9817-0410-a4d7-c38de5d9e867

ChangeLog
typo3/sysext/rtehtmlarea/ChangeLog
typo3/sysext/rtehtmlarea/mod4/class.tx_rtehtmlarea_select_image.php

index c9ff6f2..d7bd7d4 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2010-06-29  Stanislas Rolland  <typo3@sjbr.ca>
+
+       * Fixed bug #14905: htmlArea RTE: Image dialogue shows tab "Current picture" when there is no current image
+
 2010-06-29  Steffen Kamper  <info@sk-typo3.de>
 
        * Follow-up to #14553: topFrameH configuration option doesn't work anymore
index 3f38852..5c0ef2c 100644 (file)
@@ -1,3 +1,7 @@
+2010-06-29  Stanislas Rolland  <typo3@sjbr.ca>
+
+       * Fixed bug #14905: htmlArea RTE: Image dialogue shows tab "Current picture" when there is no current image 
+
 2010-06-28  Stanislas Rolland  <typo3@sjbr.ca>
 
        * Fixed bug #14830: htmlArea RTE: Entering line breaks with Safari not possible
index b0dc34d..41be59e 100644 (file)
@@ -1154,6 +1154,10 @@ class tx_rtehtmlarea_select_image extends browse_links {
                foreach ($this->hookObjects as $hookObject) {
                        $allowedItems = $hookObject->addAllowedItems($allowedItems);
                }
+                       // Remove tab "image" if there is no current image
+               if ($this->act !== 'image') {
+                       $allowedItems = array_diff($allowedItems, array('image'));
+               }
                        // Remove options according to RTE configuration
                if (is_array($this->buttonConfig['options.']) && $this->buttonConfig['options.']['removeItems']) {
                        $allowedItems = array_diff($allowedItems, t3lib_div::trimExplode(',', $this->buttonConfig['options.']['removeItems'], 1));