diff --git a/media_gallery.install b/media_gallery.install index 4d468fc..6e1309d 100644 --- a/media_gallery.install +++ b/media_gallery.install @@ -905,25 +905,6 @@ function media_gallery_create_taxonomy_term($vocabulary) { taxonomy_term_save($term); _media_gallery_allow_all_pathauto_aliases(); - // Create a menu link for this taxonomy term. We set the link title to - // 'Taxonomy term' in order to match the title of the corresponding router - // item, since this is what triggers the menu system to display a dynamic - // title for the link. - $menu_item = array( - 'menu_name' => 'main-menu', - 'weight' => 10, - 'link_title' => 'Taxonomy term', - 'link_path' => 'taxonomy/term/' . $term->tid, - ); - // If the router item doesn't exist yet (for example, if we are installing - // either the Taxonomy module or Drupal itself at the same time as Media - // Gallery), rebuild the menu before saving, to avoid errors. - $router_item_exists = (bool) db_query_range('SELECT 1 FROM {menu_router} WHERE path = :path', 0, 1, array(':path' => 'taxonomy/term/%'))->fetchField(); - if (!$router_item_exists) { - menu_rebuild(); - } - menu_link_save($menu_item); - // Save the term ID for future use. variable_set('media_gallery_default_collection_tid', $term->tid); }