summaryrefslogtreecommitdiff
path: root/includes
diff options
context:
space:
mode:
Diffstat (limited to 'includes')
-rw-r--r--includes/menu.inc10
1 files changed, 8 insertions, 2 deletions
diff --git a/includes/menu.inc b/includes/menu.inc
index 618255b82..9d2a259af 100644
--- a/includes/menu.inc
+++ b/includes/menu.inc
@@ -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.