- Patch #682784 by andrewfn: once created, menu item query strings could never be deleted.

merge-requests/26/head
Dries Buytaert 2010-02-01 19:19:35 +00:00
parent df6ae20b4f
commit 441ea23bbd
1 changed files with 8 additions and 0 deletions

View File

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