[FEATURE] Allow ext_icon.png as extension icon besides ext_icon.gif
authorIngo Renner <ingo@typo3.org>
Sat, 18 Aug 2012 15:36:07 +0000 (17:36 +0200)
committerIngo Renner <ingo@typo3.org>
Sat, 18 Aug 2012 15:44:24 +0000 (17:44 +0200)
Follow-Up to #37595

Fixes two things found during the review. Due to an unfortunate
timely intersection the original patch set was merged without
these fixes.

Change-Id: Ic9c69f09c1e92c628cd29c5c303e1807022a2a8e
Fixes: #37595
Releases: 6.0
Reviewed-on: http://review.typo3.org/13898
Reviewed-by: Christian Kuhn
Tested-by: Christian Kuhn
Reviewed-by: Ingo Renner
Tested-by: Ingo Renner
t3lib/class.t3lib_extmgm.php
typo3/db_new.php

index 45065ce..58dc79f 100644 (file)
@@ -1642,13 +1642,10 @@ tt_content.' . $key . $prefix . ' {
         */
        public static function getExtensionIcon($extensionPath, $returnFullPath = FALSE){
                $icon = '';
-               $iconFileTypesToCheckFor = array(
-                       'png',
-                       'gif',
-               );
+               $iconFileTypesToCheckFor = array('png', 'gif');
 
                foreach ($iconFileTypesToCheckFor as $fileType){
-                       if (@is_file($extensionPath . 'ext_icon.' . $fileType)) {
+                       if (file_exists($extensionPath . 'ext_icon.' . $fileType)) {
                                $icon = 'ext_icon.' . $fileType;
                                break;
                        }
index 4414d84..cde5bec 100644 (file)
@@ -503,8 +503,11 @@ class SC_db_new {
                                                                                        include(t3lib_extMgm::extPath($_EXTKEY) . 'ext_emconf.php');
                                                                                        $thisTitle = $EM_CONF[$_EXTKEY]['title'];
                                                                                }
-                                                                               $iconFile[$_EXTKEY] = '<img alt="" src="' . t3lib_extMgm::extRelPath($_EXTKEY) .
-                                                                                       $GLOBALS['TYPO3_LOADED_EXT'][$_EXTKEY]['ext_icon'] . '" height="16" />';
+                                                                               $iconFile[$_EXTKEY] = '<img ' .
+                                                                                       'src="' . t3lib_extMgm::extRelPath($_EXTKEY) .
+                                                                                               $GLOBALS['TYPO3_LOADED_EXT'][$_EXTKEY]['ext_icon'] . '" ' .
+                                                                                       'width="16" height="16" ' .
+                                                                                       'alt="' . $thisTitle . '" />';
                                                                        } else {
                                                                                $thisTitle = $nameParts[1];
                                                                                $iconFile[$_EXTKEY] = '';