You are here

function special_menu_items_update_7000 in Special menu items 7

Same name and namespace in other branches
  1. 7.2 special_menu_items.install \special_menu_items_update_7000()

"nolink" to <nolink> and "separator" to <separator>

File

./special_menu_items.install, line 16

Code

function special_menu_items_update_7000(&$sandbox) {

  //change "nolink" to <nolink>
  db_update('menu_links')
    ->fields(array(
    'link_path' => '<nolink>',
    'router_path' => '<nolink>',
  ))
    ->condition('router_path', 'nolink', '=')
    ->execute();

  //change "separator" to <separator>
  db_update('menu_links')
    ->fields(array(
    'link_path' => '<separator>',
    'router_path' => '<separator>',
  ))
    ->condition('router_path', 'separator', '=')
    ->execute();

  //we don't need this variable anymore
  variable_del('special_menu_items_menu_item_link');
}