diff -ruN original/taxonomy_menu.module mod/taxonomy_menu.module --- original/taxonomy_menu.module 2010-06-06 23:47:46.000000000 +0700 +++ mod/taxonomy_menu.module 2010-06-11 22:17:09.000000000 +0700 @@ -493,7 +493,8 @@ * 'mlid' => if this is filled in then the mlid will be updated */ function _taxonomy_menu_save($item) { - $insert = TRUE; + $insert = $item['mlid'] ? FALSE : TRUE; + //create the path. //use url to create he inital path //we need to remove the first '/' so menu_link_save will work correctly @@ -513,12 +514,21 @@ $path = rtrim($matches[1]); } + //Construct options. Other modules may have changed it, so we need to keep their changes. + $options = array(); + if (!$insert) + { + $options = unserialize(db_result(db_query('SELECT options FROM {menu_links} WHERE mlid = %d', $item['mlid']))); + } + if (!is_array($options['attributes'])) + $options['attributes'] = array(); + $options['attributes']['title'] = trim($item['description']) ? check_plain($item['description']) : check_plain($item['name']); + $link = array( 'link_title' => check_plain($item['name']), 'menu_name' => $item['menu_name'], 'plid' => $plid, - 'options' => array('attributes' => array('title' => trim($item['description']) - ? check_plain($item['description']) : check_plain($item['name']))), + 'options' => $options, 'weight' => $item['weight'], 'module' => 'taxonomy_menu', 'expanded' => variable_get('taxonomy_menu_expanded_'. $item['vid'], TRUE), @@ -541,7 +551,6 @@ //if passed a mlid then add it if ($item['mlid']) { $link['mlid'] = $item['mlid']; - $insert = FALSE; } //FIXME: i18nmenu need to be cleaned up to allow translation from other menu module