- Patch #147656 by Shakur: bugfix.
parent
d2e4f35fc9
commit
722f8faae9
|
@ -306,15 +306,12 @@ function menu_edit_item(&$form_state, $type, $id = 0) {
|
||||||
|
|
||||||
function menu_edit_item_validate($form, &$form_state) {
|
function menu_edit_item_validate($form, &$form_state) {
|
||||||
$item = $form_state['values'];
|
$item = $form_state['values'];
|
||||||
if (isset($item['path']) && !menu_path_is_external($item['path'])) {
|
if (isset($item['link_path']) && !menu_path_is_external($item['link_path'])) {
|
||||||
$path = $item['path'];
|
$path = $item['link_path'];
|
||||||
$item = menu_get_item($path);
|
$item = menu_get_item($path);
|
||||||
if (!$item || !$item['access']) {
|
if (!$item || !$item['access']) {
|
||||||
form_set_error('path', t('This path is either invalid or you do not have access to it'));
|
form_set_error('path', t('This path is either invalid or you do not have access to it'));
|
||||||
}
|
}
|
||||||
elseif ($path != $item['original_path'] && $item['path'] == $path) {
|
|
||||||
form_set_error('path', t('There is already a menu item pointing to this path.'));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue