function system_update_8031

Rename default menu names.

Related topics

File

drupal/core/modules/system/system.install, line 1719
Install, update and uninstall functions for the system module.

Code

function system_update_8031() {
  $map = array(
    'navigation' => 'tools',
    'management' => 'admin',
    'user-menu' => 'account',
    'main-menu' => 'main',
  );
  foreach ($map as $old => $new) {
    db_update('menu_links')
      ->condition('menu_name', $old)
      ->fields(array(
      'menu_name' => $new,
    ))
      ->execute();
  }
}