function addanother_update_1 in Add Another 7
Same name and namespace in other branches
- 6 addanother.install \addanother_update_1()
Port over to the new variable storage system.
File
- ./
addanother.install, line 19 - Install, update and uninstall functions for the Add another module.
Code
function addanother_update_1() {
$types = node_type_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();
}