Fixed bug #10954: Validation issue: Images with empty attributes in Module menu ...
authorPatrick Broens <patrick@netcreators.com>
Mon, 27 Apr 2009 09:32:26 +0000 (09:32 +0000)
committerPatrick Broens <patrick@netcreators.com>
Mon, 27 Apr 2009 09:32:26 +0000 (09:32 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@5366 709f56b5-9817-0410-a4d7-c38de5d9e867

ChangeLog
typo3/classes/class.modulemenu.php
typo3/sysext/t3skin/stylesheets/modulemenu.css

index a1efe5e..1119fd2 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,7 @@
 2009-04-27  Patrick Broens  <patrick@patrickbroens.nl>
 
        * Fixed bug #10950: XML prologue always after doctype declaration in BE template building
+       * Fixed bug #10954: Validation issue: Images with empty attributes in Module menu  in BE
 
 2009-04-24  Benjamin Mack  <benni@typo3.org>
 
index b6f9eba..310ce5f 100644 (file)
@@ -300,16 +300,24 @@ class ModuleMenu {
         * @return      array           icon data array with 'filename', 'size', and 'html'
         */
        protected function getModuleIcon($moduleKey) {
-               $icon             = array();
+               $icon = array(
+                       'filename' => '',
+                       'size' => '',
+                       'title' => '',
+                       'html' => ''
+               );
+
                $iconFileRelative = $this->getModuleIconRelative($GLOBALS['LANG']->moduleLabels['tabs_images'][$moduleKey]);
                $iconFileAbsolute = $this->getModuleIconAbsolute($GLOBALS['LANG']->moduleLabels['tabs_images'][$moduleKey]);
                $iconSizes        = @getimagesize($iconFileAbsolute);
                $iconTitle        = $GLOBALS['LANG']->moduleLabels['tabs'][$moduleKey];
 
-               $icon['filename'] = $iconFileRelative;
-               $icon['size']     = $iconSizes[3];
-               $icon['title']    = htmlspecialchars($iconTitle);
-               $icon['html']     = '<img src="'.$iconFileRelative.'" '.$iconSizes[3].' title="'.htmlspecialchars($iconTitle).'" alt="'.htmlspecialchars($iconTitle).'" />';
+               if(!empty($iconFileRelative)) {
+                       $icon['filename'] = $iconFileRelative;
+                       $icon['size']     = $iconSizes[3];
+                       $icon['title']    = htmlspecialchars($iconTitle);
+                       $icon['html']     = '<img src="'.$iconFileRelative.'" '.$iconSizes[3].' title="'.htmlspecialchars($iconTitle).'" alt="'.htmlspecialchars($iconTitle).'" />';
+               }
 
                return $icon;
        }
index d95c14f..6ace1d1 100644 (file)
@@ -59,10 +59,6 @@ TYPO3 backend menu - vertical
        margin-left: 0px;
 }
 
-#typo3-menu li div img {
-       display: none;
-}
-
 #typo3-menu li img {
        vertical-align: baseline;
 }