comment_update_7009
- Versions
- 7
comment_update_7009()
Update preview setting variable to use new constants
Related topics
Code
modules/comment/comment.install, line 179
<?php
function comment_update_7009() {
foreach (node_type_get_types() as $type => $object) {
// There were only two comment modes in the past:
// - 1 was 'required' previously, convert into DRUPAL_REQUIRED (2).
// - 0 was 'optional' previously, convert into DRUPAL_OPTIONAL (1).
$original_preview = variable_get('comment_preview_' . $type, 1);
if ($original_preview) {
$preview = DRUPAL_REQUIRED;
}
else {
$preview = DRUPAL_OPTIONAL;
}
variable_set('comment_preview_' . $type, $preview);
}
return array();
}
?>Login or register to post comments 