diff options
author | Dries Buytaert <dries@buytaert.net> | 2010-01-02 15:00:34 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2010-01-02 15:00:34 +0000 |
commit | b12d812b9397609a5853d8c2b73f29d282496fd9 (patch) | |
tree | cf6de6724ccba65a56aa3d73f6bf554ccc3c0313 /modules/field/field.attach.inc | |
parent | 89028a43bbbaf73e6aa1e8e00bc12d46d1fc7119 (diff) | |
download | brdo-b12d812b9397609a5853d8c2b73f29d282496fd9.tar.gz brdo-b12d812b9397609a5853d8c2b73f29d282496fd9.tar.bz2 |
- Patch #665878 by yched: fixed field_extra_fields()
Diffstat (limited to 'modules/field/field.attach.inc')
-rw-r--r-- | modules/field/field.attach.inc | 22 |
1 files changed, 2 insertions, 20 deletions
diff --git a/modules/field/field.attach.inc b/modules/field/field.attach.inc index 373e8c51d..ea58b0282 100644 --- a/modules/field/field.attach.inc +++ b/modules/field/field.attach.inc @@ -491,7 +491,7 @@ function field_attach_form($obj_type, $object, &$form, &$form_state, $langcode = list($id, $vid, $bundle) = entity_extract_ids($obj_type, $object); $form['#attached']['css'][] = drupal_get_path('module', 'field') . '/theme/field.css'; $form['#pre_render'][] = '_field_extra_weights_pre_render'; - $form['#extra_fields'] = field_extra_fields($bundle); + $form['#extra_fields'] = field_extra_fields($obj_type, $bundle); // Let other modules make changes to the form. // Avoid module_invoke_all() to let parameters be taken by reference. @@ -1200,7 +1200,7 @@ function field_attach_view($obj_type, $object, $view_mode = 'full', $langcode = // Add custom weight handling. list($id, $vid, $bundle) = entity_extract_ids($obj_type, $object); $output['#pre_render'][] = '_field_extra_weights_pre_render'; - $output['#extra_fields'] = field_extra_fields($bundle); + $output['#extra_fields'] = field_extra_fields($obj_type, $bundle); // Include CSS styles. $output['#attached']['css'][] = drupal_get_path('module', 'field') . '/theme/field.css'; @@ -1261,24 +1261,6 @@ function field_attach_preprocess($obj_type, $object, $element, &$variables) { } /** - * Retrieve the user-defined weight for a 'pseudo-field' component. - * - * @param $bundle - * The bundle name. - * @param $pseudo_field - * The name of the 'pseudo-field'. - * @return - * The weight for the 'pseudo-field', respecting the user settings stored by - * field.module. - */ -function field_attach_extra_weight($bundle, $pseudo_field) { - $extra = field_extra_fields($bundle); - if (isset($extra[$pseudo_field])) { - return $extra[$pseudo_field]['weight']; - } -} - -/** * Implements hook_node_prepare_translation(). * * TODO D7: We do not yet know if this really belongs in Field API. |