function cpn_update_6101 in Code per Node 6
Update variables to new format.
File
- ./
cpn.install, line 166 - Installation, schema and update hook implementations.
Code
function cpn_update_6101() {
$ret = array();
foreach (array_keys(node_get_types('names')) as $node_type) {
foreach (array(
'css',
'js',
) as $type) {
if (variable_get('cpn_' . $type . '_' . $node_type, FALSE)) {
variable_set('cpn_' . $type . '_enabled_' . $node_type, TRUE);
variable_del('cpn_' . $type . '_' . $node_type);
}
}
}
return $ret;
}