[TASK] Replace sprite icons in ImportExport::addRelations 30/43230/2
authorMathias Brodala <mbrodala@pagemachine.de>
Sat, 12 Sep 2015 08:51:12 +0000 (10:51 +0200)
committerNicole Cordes <typo3@cordes.co>
Sat, 12 Sep 2015 11:03:01 +0000 (13:03 +0200)
Replaces IconUtility::getSpriteIcon call for the icons
"status-status-checked" and "status-dialog-warning".

Resolves: #69708
Releases: master
Change-Id: I7a9395b50d904fd79ceed36f7748f7895e0606d4
Reviewed-on: http://review.typo3.org/43230
Reviewed-by: Morton Jonuschat <m.jonuschat@mojocode.de>
Tested-by: Morton Jonuschat <m.jonuschat@mojocode.de>
Reviewed-by: Nicole Cordes <typo3@cordes.co>
Tested-by: Nicole Cordes <typo3@cordes.co>
typo3/sysext/impexp/Classes/ImportExport.php

index 790777c..0efec10 100644 (file)
@@ -3723,6 +3723,9 @@ class ImportExport {
         * @see singleRecordLines()
         */
        public function addRelations($rels, &$lines, $preCode, $recurCheck = array(), $htmlColorClass = '') {
+               /** @var IconFactory $iconFactory */
+               $iconFactory = GeneralUtility::makeInstance(IconFactory::class);
+
                foreach ($rels as $dat) {
                        $table = $dat['table'];
                        $uid = $dat['id'];
@@ -3762,7 +3765,7 @@ class ImportExport {
                                $staticFixed = TRUE;
                        }
 
-                       $spriteIcon = \TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIcon($spriteIconName, array('class' => $spriteIconClass, 'title' => $pInfo['ref']));
+                       $spriteIcon = '<span class="' . $spriteIconClass . '" title="' . htmlspecialchars($pInfo['ref']) . '">' . $iconFactory->getIcon($spriteIconName, Icon::SIZE_SMALL) . '</span>';
 
                        $pInfo['preCode'] = $preCode . '&nbsp;&nbsp;&nbsp;&nbsp;' . $spriteIcon;
                        $pInfo['class'] = $htmlColorClass ?: 'bgColor3';