[TASK] Remove usage of _icon_website.gif 13/40313/3
authorBenjamin Mack <benni@typo3.org>
Tue, 16 Jun 2015 16:00:39 +0000 (18:00 +0200)
committerChristian Kuhn <lolli@schwarzbu.ch>
Tue, 16 Jun 2015 16:15:51 +0000 (18:15 +0200)
The occurence of _icon_website.gif was still used in two places
instead of using the proper sprite icon. The patch changes the
places to use sprite icons.

Resolves: #67517
Releases: master
Change-Id: I14222563aebfc08c2eb030b3550525d82597358a
Reviewed-on: http://review.typo3.org/40313
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
Reviewed-by: Jan Helke <typo3@helke.de>
Tested-by: Jan Helke <typo3@helke.de>
typo3/sysext/fluid/Classes/ViewHelpers/Be/PageInfoViewHelper.php
typo3/sysext/impexp/Classes/LocalPageTree.php

index c14f8dc..7c32a10 100644 (file)
@@ -72,21 +72,21 @@ class PageInfoViewHelper extends AbstractBackendViewHelper implements Compilable
                if ($pageRecord['uid']) {
                        // If there IS a real page
                        $alttext = BackendUtility::getRecordIconAltText($pageRecord, 'pages');
-                       $iconImg = IconUtility::getSpriteIconForRecord('pages', $pageRecord, array('title' => htmlspecialchars($alttext)));
+                       $theIcon = IconUtility::getSpriteIconForRecord('pages', $pageRecord, array('title' => htmlspecialchars($alttext)));
                        // Make Icon:
-                       $theIcon = $doc->wrapClickMenuOnIcon($iconImg, 'pages', $pageRecord['uid']);
+                       $theIcon = $doc->wrapClickMenuOnIcon($theIcon, 'pages', $pageRecord['uid']);
+
+                       // Setting icon with clickmenu + uid
+                       $theIcon .= ' <em>[PID: ' . $pageRecord['uid'] . ']</em>';
                } else {
                        // On root-level of page tree
                        // Make Icon
-                       $iconImg = '<img' . IconUtility::skinImg($GLOBALS['BACK_PATH'], 'gfx/i/_icon_website.gif') . ' alt="' . htmlspecialchars($GLOBALS['TYPO3_CONF_VARS']['SYS']['sitename']) . '" />';
+                       $theIcon = IconUtility::getSpriteIcon('apps-pagetree-page-domain', array('title' => htmlspecialchars($GLOBALS['TYPO3_CONF_VARS']['SYS']['sitename'])));
                        if ($GLOBALS['BE_USER']->user['admin']) {
-                               $theIcon = $doc->wrapClickMenuOnIcon($iconImg, 'pages', 0);
-                       } else {
-                               $theIcon = $iconImg;
+                               $theIcon = $doc->wrapClickMenuOnIcon($theIcon, 'pages', 0);
                        }
                }
-               // Setting icon with clickmenu + uid
-               return $theIcon . '<em>[pid: ' . $pageRecord['uid'] . ']</em>';
+               return $theIcon;
        }
 
 }
index d16bd37..9a85732 100644 (file)
@@ -109,7 +109,7 @@ class LocalPageTree extends \TYPO3\CMS\Backend\Tree\View\BrowseTreeView {
                                'title' => $GLOBALS['TYPO3_CONF_VARS']['SYS']['sitename'],
                                'uid' => 0
                        );
-                       $firstHtml .= $this->wrapIcon('<img' . \TYPO3\CMS\Backend\Utility\IconUtility::skinImg($this->backPath, 'gfx/i/_icon_website.gif', 'width="18" height="16"') . ' align="top" alt="" />', $rootRec);
+                       $firstHtml .= $this->wrapIcon(\TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIcon('apps-pagetree-page-domain'), $rootRec);
                }
                $this->tree[] = array('HTML' => $firstHtml, 'row' => $rootRec);
                if ($isOpen) {