Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Index: sites/all/modules/contrib/filefield/filefield_field.inc
- ===================================================================
- --- sites/all/modules/contrib/filefield/filefield_field.inc (révision 779)
- +++ sites/all/modules/contrib/filefield/filefield_field.inc (copie de travail)
- @@ -281,8 +281,11 @@
- // Check for default images at the widget level.
- // TODO: Provide an API to ImageField to do this itself?
- if (!empty($field['widget']['use_default_image']) && !empty($field['widget']['default_image']['filepath']) && $delta == 0) {
- + $before = count($GLOBALS['node']->field_ouvrage_image_couverture[0]);
- $items[$delta] = $field['widget']['default_image'];
- $items[$delta]['default'] = TRUE;
- + $after = count($GLOBALS['node']->field_ouvrage_image_couverture[0]);
- + drupal_set_message('Before ' . $before . ' and after ' . $after);
- }
- else {
- $items[$delta] = NULL;
- Index: index.php
- ===================================================================
- --- index.php (révision 779)
- +++ index.php (copie de travail)
- @@ -14,6 +14,10 @@
- require_once './includes/bootstrap.inc';
- drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL);
- +$node = node_load(44);
- +$node->field_ouvrage_image_couverture = array(array('fid' => 0, 'fou' => 'vrai'));
- +node_save($node);
- +
- $return = menu_execute_active_handler();
- // Menu status constants are integers; page content is a string.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement