diff options
author | Angie Byron <webchick@24967.no-reply.drupal.org> | 2009-08-19 13:31:14 +0000 |
---|---|---|
committer | Angie Byron <webchick@24967.no-reply.drupal.org> | 2009-08-19 13:31:14 +0000 |
commit | e998857eb8a5ef4d2ebe381a57c19b1b355fe4ef (patch) | |
tree | 88517c7981c03300ea0dc575f72719c8d3468027 /modules/field/field.form.inc | |
parent | 24289301aba2666edb5909edf63cdb6cdedf994e (diff) | |
download | brdo-e998857eb8a5ef4d2ebe381a57c19b1b355fe4ef.tar.gz brdo-e998857eb8a5ef4d2ebe381a57c19b1b355fe4ef.tar.bz2 |
#516138 by yched, KarenS, quicksketch, bangpound, et al.: CC-FREAKING-K IN CORE! OH YEAH! :D
Diffstat (limited to 'modules/field/field.form.inc')
-rw-r--r-- | modules/field/field.form.inc | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/modules/field/field.form.inc b/modules/field/field.form.inc index 10f687a56..0bc155bc4 100644 --- a/modules/field/field.form.inc +++ b/modules/field/field.form.inc @@ -37,13 +37,9 @@ function field_default_form($obj_type, $object, $field, $instance, $items, &$for 'instance' => $instance, ); - // Populate widgets with default values if we're creating a new object. - if (empty($items) && empty($id) && !empty($instance['default_value_function'])) { - $items = array(); - $function = $instance['default_value_function']; - if (drupal_function_exists($function)) { - $items = $function($obj_type, $object, $field, $instance); - } + // Populate widgets with default values when creating a new object. + if (empty($items) && empty($id)) { + $items = field_get_default_value($obj_type, $object, $field, $instance); } $form_element = array(); |