- Patch #682784 by andrewfn: once created, menu item query strings could never be deleted.
parent
df6ae20b4f
commit
441ea23bbd
|
@ -348,9 +348,17 @@ function menu_edit_item_validate($form, &$form_state) {
|
|||
if (isset($parsed_link['query'])) {
|
||||
$item['options']['query'] = drupal_get_query_array($parsed_link['query']);
|
||||
}
|
||||
else {
|
||||
// Use unset() rather than setting to empty string
|
||||
// to avoid redundant serialized data being stored.
|
||||
unset($item['options']['query']);
|
||||
}
|
||||
if (isset($parsed_link['fragment'])) {
|
||||
$item['options']['fragment'] = $parsed_link['fragment'];
|
||||
}
|
||||
else {
|
||||
unset($item['options']['fragment']);
|
||||
}
|
||||
if ($item['link_path'] != $parsed_link['path']) {
|
||||
$item['link_path'] = $parsed_link['path'];
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue