[BUGFIX] RTE: Set "magic" as default image mode 55/40155/3
authorAndreas Fernandez <a.fernandez@scripting-base.de>
Wed, 10 Jun 2015 18:32:51 +0000 (20:32 +0200)
committerMarkus Klein <markus.klein@typo3.org>
Wed, 10 Jun 2015 21:23:38 +0000 (23:23 +0200)
Sets the image mode to "magic" on first call, as "New Magic Image"
is the first tab being called.

Resolves: #65821
Releases: master
Change-Id: If3064b93a16c9a86a3898afa0cccb56322d5b1cf
Reviewed-on: http://review.typo3.org/40155
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Tested-by: Wouter Wolters <typo3@wouterwolters.nl>
Reviewed-by: Markus Klein <markus.klein@typo3.org>
Tested-by: Markus Klein <markus.klein@typo3.org>
typo3/sysext/rtehtmlarea/Classes/SelectImage.php

index 42abb84..998be9c 100644 (file)
@@ -137,7 +137,7 @@ class SelectImage extends \TYPO3\CMS\Recordlist\Browser\ElementBrowser {
                }');
                $this->doc->getPageRenderer()->loadRequireJsModule('TYPO3/CMS/Rtehtmlarea/Modules/SelectImage', 'function(SelectImage) {
                        SelectImage.editorNo = "' . $this->editorNo . '";
-                       SelectImage.act = "' . ($this->act ?: 'plain') . '";
+                       SelectImage.act = "' . ($this->act ?: reset($this->allowedItems)) . '";
                        SelectImage.sys_language_content = "' . $this->sys_language_content . '";
                        SelectImage.RTEtsConfigParams = "' . rawurlencode($this->RTEtsConfigParams) . '";
                        SelectImage.bparams = "' . $this->bparams . '";