Fixed bug #14968: Add unit tests for t3lib_div::validIP (Thanks to Nikolas Hagelstein...
[Packages/TYPO3.CMS.git] / typo3 / class.alt_menu_functions.inc
old mode 100755 (executable)
new mode 100644 (file)
index ce783ad..ee751cf
@@ -142,8 +142,7 @@ class alt_menu_functions {
                }
 
                        // Traverse array with modules
-               reset($theModules);
-               while(list($moduleName,$moduleInfo)=each($theModules))  {
+               foreach ($theModules as $moduleName => $moduleInfo) {
                        $mC++;
 
                        $prefix = $this->getNavFramePrefix($moduleInfo);
@@ -207,13 +206,13 @@ class alt_menu_functions {
                        }
 
                        $selectItems[] = '<option value="top.goToModule(\''.$moduleName.'\');">'.htmlspecialchars($LANG->moduleLabels['tabs'][$moduleKey]).'</option>';
-                       $label='&nbsp;<b>'.$label.'</b>&nbsp;';
+                       $label='&nbsp;<strong>'.$label.'</strong>&nbsp;';
 
 
                                // make menu collapsable
                        if($collapsable == 1 && is_array($moduleInfo['sub'])) {
                                $collapseJS = 'onclick="window.location.href=\'alt_menu.php?collapsedOverride['.$moduleName.']='.($config[$moduleName] ? '0' : '1').'\'"';
-                               $collapseIcon = '<span class="c-iconCollapse"><img'.t3lib_iconWorks::skinImg($backPath,'gfx/ol/'.($config[$moduleName] ? 'plusbullet.gif':'minusbullet.gif'),'width="18" height="16"').' title="" alt="" /></span>';
+                               $collapseIcon = t3lib_iconWorks::getSpriteIcon('actions-view-table-' . ($config[$moduleName] ? 'expand' : 'collapse'), array('class' => 'c-iconCollapse'));
                        } else {
                                $collapseJS = $collapseIcon = '';
                        }
@@ -239,10 +238,9 @@ class alt_menu_functions {
                                // Traversing submodules
                        $subCode='';
                        if (is_array($moduleInfo['sub']))       {
-                               reset($moduleInfo['sub']);
                                $collection[$moduleKey]['subitems'] = array();
                                $c=0;
-                               while(list($subName,$subInfo)=each($moduleInfo['sub'])) {
+                               foreach ($moduleInfo['sub'] as $subName => $subInfo) {
                                        if ($c==0)              {
                                                $subCode.='
                                                                <tr class="c-first">
@@ -355,11 +353,24 @@ class alt_menu_functions {
                                                        </tr>';
 
                                                // For "About modules":
+                                       $moduleLabel = htmlspecialchars($LANG->moduleLabels['labels'][$subKey.'label']);
+                                       $moduleLabelHtml = !empty($moduleLabel) ? '<strong>' . $moduleLabel . '</strong><br />' : '';
+                                       $moduleDescription = $LANG->moduleLabels['labels'][$subKey.'descr'];
+
                                        $descrCode.='
                                                        <tr class="c-subitem-row">
                                                                <td align="center">'.$imageCode.'</td>
-                                                               <td>'.$flabel.'&nbsp;&nbsp;</td>
-                                                               <td><strong>'.htmlspecialchars($LANG->moduleLabels['labels'][$subKey.'label']).'</strong><br />'.$LANG->moduleLabels['labels'][$subKey.'descr'].'</td>
+                                                               <td>'.$flabel.'&nbsp;&nbsp;</td>';
+
+                                       if (!empty($moduleLabel) || !empty($moduleDescription)) {
+                                               $descrCode .= '
+                                                               <td class="module-description">' . $moduleLabelHtml . $moduleDescription . '</td>';
+                                       } else {
+                                               $descrCode .= '
+                                                               <td>&nbsp;</td>';
+                                       }
+
+                                       $descrCode .= '
                                                        </tr>';
 
                                                // Possibly adding a divider line