function menu_update_8001

Rename default menu names.

File

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

Code

function menu_update_8001() {

  // Only the internal identifiers are updated; the labels and descriptions
  // might have been customized and do not have to be renamed.
  $map = array(
    'navigation' => 'tools',
    'management' => 'admin',
    'user-menu' => 'account',
    'main-menu' => 'main',
  );
  foreach ($map as $old => $new) {
    db_update('menu_custom')
      ->condition('menu_name', $old)
      ->fields(array(
      'menu_name' => $new,
    ))
      ->execute();
  }
}