[BUGFIX] Default image title in RTE contains the file name 59/29759/2
authorStanislas Rolland <typo3@sjbr.ca>
Thu, 1 May 2014 14:17:09 +0000 (10:17 -0400)
committerWouter Wolters <typo3@wouterwolters.nl>
Fri, 2 May 2014 16:43:58 +0000 (18:43 +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/29759
Reviewed-by: Stanislas Rolland
Tested-by: Stanislas Rolland
Reviewed-by: Markus Klein
Tested-by: Markus Klein
Reviewed-by: Nadir S.
Tested-by: Nadir S.
Reviewed-by: Wouter Wolters
Tested-by: Wouter Wolters
typo3/sysext/rtehtmlarea/Classes/SelectImage.php

index 68bb53a..2892ec2 100644 (file)
@@ -187,7 +187,7 @@ class SelectImage extends \TYPO3\CMS\Recordlist\Browser\ElementBrowser {
                        $fileObject = 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 . '"');