Commit 4f5c33f9 authored by dealancer's avatar dealancer
Browse files

#1117760 by dealancer: removed check if link path is correct

parent fd16e977
......@@ -56,20 +56,6 @@ function menu_token_form_menu_edit_item_validate($form, &$form_state) {
$form_state['values']['menu']['link_path'] = '<front>';
// Set 'alter' option to use hook_translated_menu_link().
$form_state['values']['menu']['options']['alter'] = TRUE;
$path = $form_state['values']['menu']['token']['link_path'];
// Check whether path is external.
$substituted_path = token_replace($path);
if (menu_path_is_external($substituted_path)) {
return;
}
// Check access rights for current author to create this menu item.
if ($menu_item = menu_get_item($substituted_path)) {
if ($menu_item['access']) {
return;
}
}
form_set_error('link_path', t("The path '@link_path' is either invalid or you do not have access to it.", array('@link_path' => $path)));
}
else {
$form_state['values']['menu']['link_title'] = $form_state['values']['menu']['token']['link_title'];
......
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