Commit bf28630a authored by Gábor Hojtsy's avatar Gábor Hojtsy

#213664 by chx, theborg: menu item not expanded on front page

parent 1c6cd92a
......@@ -451,7 +451,7 @@ function _menu_check_access(&$item, $map) {
/**
* Localize the router item title using t() or another callback.
*
*
* Translate the title and description to allow storage of English title
* strings in the database, yet display of them in the language required
* by the current user.
......@@ -834,7 +834,13 @@ function menu_tree_page_data($menu_name = 'navigation') {
// Build and run the query, and build the tree.
if ($item['access']) {
// Check whether a menu link exists that corresponds to the current path.
$parents = db_fetch_array(db_query("SELECT p1, p2, p3, p4, p5, p6, p7, p8 FROM {menu_links} WHERE menu_name = '%s' AND link_path = '%s'", $menu_name, $item['href']));
$args = array($menu_name, $item['href']);
$placeholders = "'%s'";
if (drupal_is_front_page()) {
$args[] = '<front>';
$placeholders .= ", '%s'";
}
$parents = db_fetch_array(db_query("SELECT p1, p2, p3, p4, p5, p6, p7, p8 FROM {menu_links} WHERE menu_name = '%s' AND link_path IN (". $placeholders .")", $args));
if (empty($parents)) {
// If no link exists, we may be on a local task that's not in the links.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment