You are here

function hosting_platform_update_6002 in Hosting 6.2

Same name and namespace in other branches
  1. 7.4 platform/hosting_platform.install \hosting_platform_update_6002()
  2. 7.3 platform/hosting_platform.install \hosting_platform_update_6002()

Move the new menu item to the primary navigation

File

platform/hosting_platform.install, line 105
Install, update and uninstall for the Platforms module.

Code

function hosting_platform_update_6002() {
  $ret = array();
  install_include(array(
    'menu',
  ));
  $menu_name = variable_get('menu_primary_links_source', 'primary-links');
  $items = install_menu_get_items('hosting/platforms');
  $item = db_fetch_array(db_query("SELECT * FROM {menu_links} WHERE mlid = %d", $items[0]['mlid']));
  $item['menu_name'] = $menu_name;
  $item['customized'] = 1;
  $item['options'] = unserialize($item['options']);
  install_menu_update_menu_item($item);
  hosting_menu_rebuild();
  return $ret;
}