summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGábor Hojtsy <gabor@hojtsy.hu>2007-12-06 10:37:47 +0000
committerGábor Hojtsy <gabor@hojtsy.hu>2007-12-06 10:37:47 +0000
commit490386721dd7c7aa11900c413056b43508f1b460 (patch)
tree360bd090ef62abbbba48fe2937d6bab548a36622
parente3ce199fc2c390c44ce6fb66ad149afcbd585f07 (diff)
downloadbrdo-490386721dd7c7aa11900c413056b43508f1b460.tar.gz
brdo-490386721dd7c7aa11900c413056b43508f1b460.tar.bz2
#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
-rw-r--r--modules/menu/menu.admin.inc5
1 files changed, 5 insertions, 0 deletions
diff --git a/modules/menu/menu.admin.inc b/modules/menu/menu.admin.inc
index 9996f5106..9022c4ca9 100644
--- a/modules/menu/menu.admin.inc
+++ b/modules/menu/menu.admin.inc
@@ -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'])) {