You are here

function addanother_update_1 in Add Another 6

Same name and namespace in other branches
  1. 7 addanother.install \addanother_update_1()

Port over to the new variable storage system.

File

./addanother.install, line 18
Uninstall and update routines for Add another module.

Code

function addanother_update_1() {
  $types = node_get_types();
  $addanother_nodetypes = array();
  foreach ($types as $type) {
    $typeid = $type->type;
    $keep = variable_get('addanother_' . $typeid, 0);
    if ($keep) {
      $addanother_nodetypes[$typeid] = $typeid;
    }
    variable_del('addanother_' . $typeid);
  }
  variable_set('addanother_nodetypes', $addanother_nodetypes);
  return array();
}