diff options
author | Gábor Hojtsy <gabor@hojtsy.hu> | 2008-02-04 12:07:23 +0000 |
---|---|---|
committer | Gábor Hojtsy <gabor@hojtsy.hu> | 2008-02-04 12:07:23 +0000 |
commit | 39d28bd43e4418632c1a755e9b948058f748a9f4 (patch) | |
tree | fc50613c6d8b7d005131016218de51bb5a3249d6 /modules | |
parent | 38332f801e82da0a5bb32c06a112d42aad12a0ba (diff) | |
download | brdo-39d28bd43e4418632c1a755e9b948058f748a9f4.tar.gz brdo-39d28bd43e4418632c1a755e9b948058f748a9f4.tar.bz2 |
#215858 by pwolanin: localized menu options were saved into the database, avoid this by using different variable names / array keys
Diffstat (limited to 'modules')
-rw-r--r-- | modules/menu/menu.admin.inc | 6 | ||||
-rw-r--r-- | modules/system/system.admin.inc | 12 | ||||
-rw-r--r-- | modules/system/system.module | 4 |
3 files changed, 9 insertions, 13 deletions
diff --git a/modules/menu/menu.admin.inc b/modules/menu/menu.admin.inc index be5cd820f..185fe78f1 100644 --- a/modules/menu/menu.admin.inc +++ b/modules/menu/menu.admin.inc @@ -14,7 +14,7 @@ function menu_overview_page() { $content = array(); while ($menu = db_fetch_array($result)) { $menu['href'] = 'admin/build/menu-customize/'. $menu['menu_name']; - $menu['options'] = array(); + $menu['localized_options'] = array(); $content[] = $menu; } return theme('admin_block_content', $content); @@ -29,7 +29,7 @@ function menu_overview_page() { function menu_overview_form(&$form_state, $menu) { global $menu_admin; $sql = " - SELECT m.load_functions, m.to_arg_functions, m.access_callback, m.access_arguments, m.page_callback, m.page_arguments, m.title, m.title_callback, m.title_arguments, m.type, ml.* + SELECT m.load_functions, m.to_arg_functions, m.access_callback, m.access_arguments, m.page_callback, m.page_arguments, m.title, m.title_callback, m.title_arguments, m.type, m.description, ml.* FROM {menu_links} ml LEFT JOIN {menu_router} m ON m.path = ml.router_path WHERE ml.menu_name = '%s' ORDER BY p1 ASC, p2 ASC, p3 ASC, p4 ASC, p5 ASC, p6 ASC, p7 ASC, p8 ASC, p9 ASC"; @@ -69,7 +69,7 @@ function _menu_overview_tree_form($tree) { $mlid = 'mlid:'. $item['mlid']; $form[$mlid]['#item'] = $item; $form[$mlid]['#attributes'] = $item['hidden'] ? array('class' => 'menu-disabled') : array('class' => 'menu-enabled'); - $form[$mlid]['title']['#value'] = l($item['title'], $item['href'], $item['options']) . ($item['hidden'] ? ' ('. t('disabled') .')' : ''); + $form[$mlid]['title']['#value'] = l($item['title'], $item['href'], $item['localized_options']) . ($item['hidden'] ? ' ('. t('disabled') .')' : ''); $form[$mlid]['hidden'] = array( '#type' => 'checkbox', '#default_value' => !$item['hidden'], diff --git a/modules/system/system.admin.inc b/modules/system/system.admin.inc index d1200a7b5..928412531 100644 --- a/modules/system/system.admin.inc +++ b/modules/system/system.admin.inc @@ -35,8 +35,8 @@ function system_main_admin_page($arg = NULL) { } // The link 'description' either derived from the hook_menu 'description' // or entered by the user via menu module is saved as the title attribute. - if (!empty($item['options']['attributes']['title'])) { - $item['description'] = $item['options']['attributes']['title']; + if (!empty($item['localized_options']['attributes']['title'])) { + $item['description'] = $item['localized_options']['attributes']['title']; } $block = $item; $block['content'] = ''; @@ -1856,18 +1856,14 @@ function theme_admin_block_content($content) { if (system_admin_compact_mode()) { $output = '<ul class="menu">'; foreach ($content as $item) { - if (empty($item['attributes'])) { - $item['attributes'] = array(); - } - $item['attributes'] += array('title' => $item['description']); - $output .= '<li class="leaf">'. l($item['title'], $item['href'], $item['options']) .'</li>'; + $output .= '<li class="leaf">'. l($item['title'], $item['href'], $item['localized_options']) .'</li>'; } $output .= '</ul>'; } else { $output = '<dl class="admin-list">'; foreach ($content as $item) { - $output .= '<dt>'. l($item['title'], $item['href'], $item['options']) .'</dt>'; + $output .= '<dt>'. l($item['title'], $item['href'], $item['localized_options']) .'</dt>'; $output .= '<dd>'. $item['description'] .'</dd>'; } $output .= '</dl>'; diff --git a/modules/system/system.module b/modules/system/system.module index a7619c207..329cc03e3 100644 --- a/modules/system/system.module +++ b/modules/system/system.module @@ -629,8 +629,8 @@ function system_admin_menu_block($item) { } // The link 'description' either derived from the hook_menu 'description' or // entered by the user via menu module is saved as the title attribute. - if (!empty($item['options']['attributes']['title'])) { - $item['description'] = $item['options']['attributes']['title']; + if (!empty($item['localized_options']['attributes']['title'])) { + $item['description'] = $item['localized_options']['attributes']['title']; } // Prepare for sorting as in function _menu_tree_check_access(). // The weight is offset so it is always positive, with a uniform 5-digits. |