Commit 49038672 authored by Gábor Hojtsy's avatar Gábor Hojtsy
Browse files

#197385 by chx and catch: the menu system stores only non-aliased paths, so...

#197385 by chx and catch: the menu system stores only non-aliased paths, so alert users to this, when they try to save aliased paths
parent e3ce199f
......@@ -326,6 +326,11 @@ function menu_edit_item(&$form_state, $type, $item, $menu) {
*/
function menu_edit_item_validate($form, &$form_state) {
$item = &$form_state['values']['menu'];
$normal_path = drupal_get_normal_path($item['link_path']);
if ($item['link_path'] != $normal_path) {
drupal_set_message(t('The menu system stores system paths only, but will use the URL alias for display. %link_path has been stored as %normal_path', array('%link_path' => $item['link_path'], '%normal_path' => $normal_path)));
$item['link_path'] = $normal_path;
}
if (!menu_path_is_external($item['link_path'])) {
$parsed_link = parse_url($item['link_path']);
if (isset($parsed_link['query'])) {
......
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