Index: admin_menu.module =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/admin_menu/admin_menu.module,v retrieving revision 1.43.2.17.2.19 diff -u -p -r1.43.2.17.2.19 admin_menu.module --- admin_menu.module 18 Jul 2009 22:10:11 -0000 1.43.2.17.2.19 +++ admin_menu.module 18 Jul 2009 22:55:26 -0000 @@ -394,8 +394,8 @@ function admin_menu_output() { // not all) multi-domain setups (e.g. language-based sub-domains). $class_site = 'admin-menu-site' . drupal_strtolower(preg_replace('/[^a-zA-Z0-9-]/', '-', $GLOBALS['cookie_domain'])); // @todo Always output container to harden JS-less support. - $content['#prefix'] = '
'; + $content['#prefix'] = ''; // Add menu additions. module_load_include('inc', 'admin_menu'); @@ -445,8 +445,10 @@ function admin_menu_output() { * - '#options': Optional alternative text for the link, passed to l(). * * The array key of each child element itself is passed as path for l(). + * @param $depth + * Current recursion level; internal use only. */ -function theme_admin_menu_links(&$elements) { +function theme_admin_menu_links(&$elements, $depth = 0) { $output = ''; foreach (element_children($elements, TRUE) as $path) { // Early-return nothing if user does not have access. @@ -458,7 +460,7 @@ function theme_admin_menu_links(&$elemen '#options' => array(), ); // Render children to determine whether this link is expandable. - $children = theme('admin_menu_links', $elements[$path]); + $children = theme('admin_menu_links', $elements[$path], $depth + 1); if (!empty($children)) { $elements[$path]['#attributes']['class'][] = 'expandable'; } @@ -482,7 +484,16 @@ function theme_admin_menu_links(&$elemen $output .= ''; } // @todo #attributes probably required for UL, but already used for LI. - return $output ? '