diff -r -u -F '^function' drupal-cvs/includes/menu.inc drupal-cvs-nax/includes/menu.inc --- drupal-cvs/includes/menu.inc 2006-10-17 11:00:28.000000000 +0200 +++ drupal-cvs-nax/includes/menu.inc 2006-10-22 03:17:42.000000000 +0200 @@ -698,7 +698,7 @@ function theme_menu_item($mid, $children * @ingroup themeable */ function theme_menu_item_link($item, $link_item) { - return l($item['title'], $link_item['path'], !empty($item['description']) ? array('title' => $item['description']) : array(), isset($item['query']) ? $item['query'] : NULL); + return l($item['title'], $link_item['path'], !empty($item['description']) ? array('title' => $item['description']) : array(), isset($item['query']) ? $item['query'] : NULL, isset($item['fragment']) ? $item['fragment'] : NULL); } /** @@ -725,6 +725,8 @@ function menu_item_link($mid, $theme = T $link = array( 'title' => $item['title'], 'href' => $link_item['path'], + 'query' => $link_item['query'], + 'fragment' => $link_item['fragment'], 'attributes' => !empty($item['description']) ? array('title' => $item['description']) : array() ); } @@ -1087,6 +1089,18 @@ function _menu_build() { if (module_exists('menu')) { $result = db_query(db_rewrite_sql('SELECT m.mid, m.* FROM {menu} m ORDER BY m.mid ASC', 'm', 'mid')); while ($item = db_fetch_object($result)) { + + // breakup menu path + $parts = parse_url($item->path); + // create correct path + $path = ($parts['scheme'] ? $parts['scheme'] . '://' : ''); + $path .= $parts['host'] . $parts['path']; + + // allocate path variables + $item->path = $path; + $item->query = $parts['query']; + $item->fragment = $parts['fragment']; + // Handle URL aliases if entered in menu administration. if (!isset($_menu['path index'][$item->path])) { $item->path = drupal_get_normal_path($item->path); @@ -1129,6 +1143,8 @@ function _menu_build() { $_menu['items'][$item->mid]['pid'] = $item->pid; $_menu['items'][$item->mid]['weight'] = $item->weight; $_menu['items'][$item->mid]['type'] = $item->type; + $_menu['items'][$item->mid]['query'] = $item->query; + $_menu['items'][$item->mid]['fragment'] = $item->fragment; } } } @@ -1187,7 +1203,7 @@ function _menu_build_visible_tree($pid = $allowed = _menu_item_is_accessible($pid); if (($parent['type'] & MENU_IS_ROOT) || ($visible && $allowed)) { - $_menu['visible'][$pid] = array('title' => $parent['title'], 'path' => $parent['path'], 'children' => $children, 'type' => $parent['type']); + $_menu['visible'][$pid] = array('title' => $parent['title'], 'path' => $parent['path'], 'children' => $children, 'type' => $parent['type'], 'query' => $parent['query'], 'fragment' => $parent['fragment']); foreach ($children as $mid) { $_menu['visible'][$mid]['pid'] = $pid; } diff -r -u -F '^function' drupal-cvs/modules/menu/menu.module drupal-cvs-nax/modules/menu/menu.module --- drupal-cvs/modules/menu/menu.module 2006-09-18 03:00:04.000000000 +0200 +++ drupal-cvs-nax/modules/menu/menu.module 2006-10-22 03:19:48.000000000 +0200 @@ -642,7 +642,7 @@ function menu_overview_tree_rows($pid = $title .= check_plain($item['title']); } else { - $title .= l($item['title'], $item['path']); + $title .= l($item['title'], $item['path'], array('title' => $item['description']), $item['query'], $item['fragment']); } if ($depth > 0) { $title = '- '. $title;