Follow-up to #13379: Sprite Icon API (Thanks to Steffen Ritter)
authorSteffen Kamper <info@sk-typo3.de>
Tue, 6 Jul 2010 09:09:28 +0000 (09:09 +0000)
committerSteffen Kamper <info@sk-typo3.de>
Tue, 6 Jul 2010 09:09:28 +0000 (09:09 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@8107 709f56b5-9817-0410-a4d7-c38de5d9e867

ChangeLog
t3lib/class.t3lib_spritemanager.php
t3lib/spritemanager/class.t3lib_spritemanager_simplehandler.php

index 5b08f8b..d2bec25 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,6 @@
 2010-07-06  Steffen Kamper  <info@sk-typo3.de>
 
+       * Follow-up to #13379: Sprite Icon API (Thanks to Steffen Ritter)
        * Fixed bug #14980: Install tool causes PHP warnings if typo3conf/ is not writeable
 
 2010-07-05  Susanne Moog  <typo3@susanne-moog.de>
index 669b7fd..d4cd163 100644 (file)
@@ -73,7 +73,7 @@ class t3lib_SpriteManager {
                        // create a fileName, the hash includes all icons and css-styles registered and the extlist
                $this->tempFileName = PATH_site . self::$tempPath .
                                                        md5(serialize($GLOBALS['TBE_STYLES']['spritemanager']) .
-                                                       md5(serialize($GLOBALS['TBE_STYLES']['spriteIconApi']['coreSpriteImageNames'])) . 
+                                                       md5(serialize($GLOBALS['TBE_STYLES']['spriteIconApi']['coreSpriteImageNames'])) .
                                                        $GLOBALS['TYPO3_CONF_VARS']['EXT']['extList']) . '.inc';
                        // if no cache-file for the current config ist present, regenerate it
                if(!@file_exists($this->tempFileName)) {
@@ -195,9 +195,9 @@ class t3lib_SpriteManager {
         */
        public static function addTcaTypeIcon($table, $type, $iconFile) {
                $GLOBALS['TBE_STYLES']['spritemanager']['singleIcons']['tcarecords-' . $table . '-' . $type] = $iconFile;
-               if(isset($GLOBALS['TCA'][$table]['typeicon_classes'])) {
-                       $GLOBALS['TCA'][$table]['typeicon_classes'][$type] = 'tcarecords-' . $table . '-' . $type;
-               } 
+               if (is_array($GLOBALS['TCA'][$table]['ctrl']['typeicon_classes'])) {
+                       $GLOBALS['TCA'][$table]['ctrl']['typeicon_classes'][$type] = 'tcarecords-' . $table . '-' . $type;
+               }
        }
 }
 
index b6707bc..3553401 100644 (file)
@@ -121,7 +121,9 @@ class t3lib_spritemanager_SimpleHandler implements t3lib_spritemanager_SpriteIco
                $iconPath = '../../' . TYPO3_mainDir;
 
                foreach((array) $GLOBALS['TBE_STYLES']['spritemanager']['singleIcons'] as $iconName => $iconFile) {
-                       $css = str_replace('###NAME###', str_replace('extensions-', '', $iconName), $this->styleSheetTemplateExtIcons);
+                       $css = str_replace('###NAME###', str_replace(
+                               array('extensions-', 'tcarecords-'), array('', ''), $iconName
+                       ), $this->styleSheetTemplateExtIcons);
                        $css = str_replace('###IMAGE###', t3lib_div::resolveBackPath($iconPath . $iconFile), $css);
 
                        $this->iconNames[] = $iconName;