function imagefield_update_6006 in ImageField 6.3
Add default values to all ImageFields.
File
- ./
imagefield.install, line 338
Code
function imagefield_update_6006() {
$ret = array();
module_load_install('content');
foreach (content_types_install() as $type_name => $fields) {
foreach ($fields as $field) {
if ($field['type'] == 'filefield' && $field['widget']['type'] == 'imagefield_widget') {
$field['widget']['file_extensions'] = isset($field['widget']['file_extensions']) ? $field['widget']['file_extensions'] : NULL;
$field['widget']['max_filesize_per_file'] = isset($field['widget']['max_filesize_per_file']) ? $field['widget']['max_filesize_per_file'] : NULL;
$field['widget']['max_filesize_per_node'] = isset($field['widget']['max_filesize_per_node']) ? $field['widget']['max_filesize_per_node'] : NULL;
content_field_instance_update($field);
}
}
}
return $ret;
}