summaryrefslogtreecommitdiff
path: root/includes/menu.inc
diff options
context:
space:
mode:
Diffstat (limited to 'includes/menu.inc')
-rw-r--r--includes/menu.inc5
1 files changed, 1 insertions, 4 deletions
diff --git a/includes/menu.inc b/includes/menu.inc
index 3da6494f3..c112028b2 100644
--- a/includes/menu.inc
+++ b/includes/menu.inc
@@ -2211,10 +2211,8 @@ function _menu_link_move_children($item, $existing_item) {
function _menu_update_parental_status($item, $exclude = FALSE) {
// If plid == 0, there is nothing to update.
if ($item['plid']) {
- // We may want to exclude the passed link as a possible child.
- //$where = $exclude ? " AND mlid != %d" : '';
// Check if at least one visible child exists in the table.
- $query = db_select('menu_links', 'm');
+ $query = db_select('menu_links', 'm');
$query->addField('m', 'mlid');
$query->condition('menu_name', $item['menu_name']);
$query->condition('plid', $item['plid']);
@@ -2225,7 +2223,6 @@ function _menu_update_parental_status($item, $exclude = FALSE) {
}
$parent_has_children = ((bool) $query->execute()->fetchField()) ? 1 : 0;
- //$parent_has_children = (bool)db_result(db_query_range("SELECT mlid FROM {menu_links} WHERE menu_name = '%s' AND plid = %d AND hidden = 0" . $where, $item['menu_name'], $item['plid'], $item['mlid'], 0, 1));
db_query("UPDATE {menu_links} SET has_children = %d WHERE mlid = %d", $parent_has_children, $item['plid']);
}