function maxlength_update_2 in Maxlength 5.2
Same name and namespace in other branches
- 6.2 maxlength.install \maxlength_update_2()
Implementation of hook_update_N().
File
- ./
maxlength.install, line 37
Code
function maxlength_update_2() {
foreach (node_get_types() as $type => $name) {
$code_old = MAXLENGTH_NODE_TYPE . $type;
$max_title = variable_get($code_old . '_t', '');
$max_body = variable_get($code_old . '_b', '');
variable_set(MAXLENGTH_NODE_TYPE . 'title_' . $type, $max_title);
variable_set(MAXLENGTH_NODE_TYPE . 'body_' . $type, $max_body);
variable_del($code_old . '_t');
variable_del($code_old . '_b');
}
return array();
}