#56415, menu_set_location (menu_set_active) mangles $_GET/arg(), patch by JonBob

4.7.x
Gerhard Killesreiter 2006-04-07 15:18:40 +00:00
parent 27e562e390
commit 77dc67ec92
1 changed files with 4 additions and 0 deletions

View File

@ -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']];