diff --git a/includes/menu.inc b/includes/menu.inc index 661f9db88477da5d480f1d6b1339b6b25f76b199..b43042d01afc1468b4f5283880d675f0a612e8f4 100644 --- a/includes/menu.inc +++ b/includes/menu.inc @@ -328,6 +328,10 @@ function menu_set_location($location) { $temp_id = min(array_keys($_menu['items'])) - 1; $prev_id = 0; + // Don't allow this function to change the actual current path, just the + // position in the menu tree. + $location[count($location) - 1]['path'] = $_GET['q']; + foreach (array_reverse($location) as $item) { if (isset($_menu['path index'][$item['path']])) { $mid = $_menu['path index'][$item['path']];