You are here

function menu_block_update_6201 in Menu Block 6.2

Same name and namespace in other branches
  1. 7.3 menu_block.install \menu_block_update_6201()
  2. 7.2 menu_block.install \menu_block_update_6201()

Converts the menu names to parent items.

File

./menu_block.install, line 125
Provides install, upgrade and un-install functions for menu_block.

Code

function menu_block_update_6201() {
  $menus = menu_get_menus();
  foreach (variable_get('menu_block_ids', array()) as $delta) {
    variable_set("menu_block_{$delta}_parent", variable_get("menu_block_{$delta}_menu_name", 'navigation') . ':0');
    variable_del("menu_block_{$delta}_menu_name");
  }
  return array(
    0 => array(
      'success' => TRUE,
      'query' => t('The 6.x-2.0 version of Menu block has been upgraded. To use menu blocks in Drupal 6, find the "Add menu block" tab (or button) on the <a href="@url">administer blocks page</a>.', array(
        '@url' => url('admin/build/block'),
      )),
    ),
  );
}