[BUGFIX] Default image title in RTE contains the file name 80/29780/2
authorStanislas Rolland <typo3@sjbr.ca>
Thu, 1 May 2014 14:17:09 +0000 (10:17 -0400)
committerStanislas Rolland <typo3@sjbr.ca>
Thu, 8 May 2014 01:18:39 +0000 (03:18 +0200)
When inserting an image in the RTE, the default image title should be
the image file title, not the image file name.

Resolves: #58373
Releases: 6.1, 6.2
Change-Id: I5aa3aae4db83cbd36244b89cc37c78184b290228
Reviewed-on: https://review.typo3.org/29780
Reviewed-by: Stanislas Rolland
Tested-by: Stanislas Rolland
typo3/sysext/rtehtmlarea/Classes/SelectImage.php

index 938de1f..c1e065d 100644 (file)
@@ -196,7 +196,7 @@ class SelectImage extends \TYPO3\CMS\Recordlist\Browser\ElementBrowser {
                        $fileObject = \TYPO3\CMS\Core\Resource\ResourceFactory::getInstance()->getFileObject($uid);
                        // Get default values for alt and title attributes from file properties
                        $altText = $fileObject->getProperty('alternative');
-                       $titleText = $fileObject->getProperty('name');
+                       $titleText = $fileObject->getProperty('title');
                        switch ($this->act) {
                        case 'magic':
                                $this->insertMagicImage($fileObject, $altText, $titleText, 'data-htmlarea-file-uid="' . $uid . '" data-htmlarea-file-table="' . $table . '"');