You are here

function dhtml_menu_update_6000 in DHTML Menu 6.4

Same name and namespace in other branches
  1. 8 dhtml_menu.install \dhtml_menu_update_6000()
  2. 6.2 dhtml_menu.install \dhtml_menu_update_6000()
  3. 6.3 dhtml_menu.install \dhtml_menu_update_6000()
  4. 7 dhtml_menu.install \dhtml_menu_update_6000()

#6000: 6.x-2.x upgrade. Custom blocks are gone, using preprocess instead.

  • Fixing a variable typo in dhtml_menus_menus.
  • Restore normal menu blocks.
  • Setting dhtml_menu_menus to its initial settings.

File

./dhtml_menu.install, line 79
dhtml_menu.install Installation and update functions for the DHTML Menu module.

Code

function dhtml_menu_update_6000() {
  variable_del('dhtml_menus_menus');
  $res = db_query("SELECT delta, theme, weight, region, custom, throttle, visibility, pages, title FROM {blocks} WHERE status AND module = '%s'", 'dhtml_menu');
  while ($row = db_fetch_array($res)) {
    if ($row['delta'] == 1) {
      $module = 'user';
    }
    else {
      $module = 'menu';
    }
    db_query("UPDATE {blocks} SET status = 1, weight = %d, region = '%s', custom = %d, throttle = %d, visibility = %d, pages = '%s', title = '%s' WHERE module = '%s' AND delta = '%s' AND theme = '%s'", $row['weight'], $row['region'], $row['custom'], $row['throttle'], $row['visibility'], $row['pages'], $row['title'], $module, $row['delta'], $row['theme']);
  }
  variable_set('dhtml_menu_menus', array(
    'navigation' => 1,
    'primary-links' => 1,
    'secondary-links' => 1,
  ));
  return array();
}