Bug #21227 » 12179_v2.diff

Administrator Admin, 2010-02-21 21:57

View differences:

typo3/classes/class.modulemenu.php (working copy)
139 139
		$rawModuleData = $this->getRawModuleData();
140 140

  
141 141
		foreach($rawModuleData as $moduleKey => $moduleData) {
142
			$menuState   = $GLOBALS['BE_USER']->uc['moduleData']['menuState'][$moduleKey];
143
			$moduleLabel = $moduleData['title'];
142
			if($moduleData['link'] != 'dummy.php' || ($moduleData['link'] == 'dummy.php' && is_array($moduleData['subitems'])) ) {
143
				$menuState   = $GLOBALS['BE_USER']->uc['moduleData']['menuState'][$moduleKey];
144
				$moduleLabel = $moduleData['title'];
144 145

  
145
			if($moduleData['link'] && $this->linkModules) {
146
				$moduleLabel = '<a href="#" onclick="top.goToModule(\''.$moduleData['name'].'\');'.$onBlur.'return false;">'.$moduleLabel.'</a>';
147
			}
146
				if($moduleData['link'] && $this->linkModules) {
147
					$moduleLabel = '<a href="#" onclick="top.goToModule(\'' . $moduleData['name'] . '\');'.$onBlur . 'return false;">' . $moduleLabel . '</a>';
148
				}
148 149

  
149
			$menu .= '<li id="modmenu_' . $moduleData['name'] . '" '.
150
				($collapsable ? 'class="menuSection"' : '') .
151
				' title="' . $moduleData['description'] . '">
152
				<div class="' . ($menuState ? 'collapsed' : 'expanded') . '">' .
153
				$moduleData['icon']['html'] . ' ' . $moduleLabel . '</div>';
150
				$menu .= '<li id="modmenu_' . $moduleData['name'] . '" '.
151
					($collapsable ? 'class="menuSection"' : '') .
152
					' title="' . $moduleData['description'] . '">
153
					<div class="' . ($menuState ? 'collapsed' : 'expanded') . '">' .
154
					$moduleData['icon']['html'] . ' ' . $moduleLabel . '</div>';
154 155

  
155
				// traverse submodules
156
			if(is_array($moduleData['subitems'])) {
157
				$menu .= $this->renderSubModules($moduleData['subitems'], $menuState);
156
					// traverse submodules
157
				if (is_array($moduleData['subitems'])) {
158
					$menu .= $this->renderSubModules($moduleData['subitems'], $menuState);
159
				}
160

  
161
				$menu .= '</li>' . "\n";
158 162
			}
159

  
160
			$menu .= '</li>'."\n";
161 163
		}
162 164

  
163
		return ($wrapInUl ? '<ul id="typo3-menu">'."\n".$menu.'</ul>'."\n" : $menu);
165
		return ($wrapInUl ? '<ul id="typo3-menu">' . "\n".$menu.'</ul>' . "\n" : $menu);
164 166
	}
165 167

  
166 168
	/**
(2-2/2)