Commit 06fd16ab authored by develCuy's avatar develCuy
Browse files

BUGS FIXING

Menu items not unassociated when deleted.
parent bec0c41f
......@@ -32,6 +32,9 @@ function menu_token_form_alter($form_id, &$form) {
}
$form['#submit'] =& $form_submit;
}
elseif ($form_id == 'menu_item_delete_form') {
$form['#submit']['menu_token_item_delete_form_submit'] = array();
}
}
/**
......@@ -53,6 +56,16 @@ function menu_token_edit_item_form_submit($form_id, $form_values) {
return 'admin/build/menu';
}
/**
* Extends menu_token_item_delete_form_submit().
*/
function menu_token_item_delete_form_submit($form_id, $form_values) {
$token_enabled = variable_get('menu_token_enabled', array());
if (isset($token_enabled[$form_values['mid']]))
unset($token_enabled[$form_values['mid']]);
variable_set('menu_token_enabled', $token_enabled);
}
/**
* Implementation of hook_footer().
*/
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment