You are here

function vertical_tabs_update_6103 in Vertical Tabs 6

Remove any variables of deleted node types.

File

./vertical_tabs.install, line 62
Install, update and uninstall functions for the vertical_tabs module.

Code

function vertical_tabs_update_6103() {
  $query = db_query("SELECT name FROM {variable} WHERE name LIKE 'vertical_tabs_fieldsets_%%'");
  $node_types = node_get_types('names');
  while ($variable = db_result($query)) {
    $node_type = substr($variable, 24);
    if (!isset($node_types[$node_type])) {
      variable_del($variable);
    }
  }
  return array();
}