jcisio

Drupal Object

Jun 21st, 2011
75
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Index: sites/all/modules/contrib/filefield/filefield_field.inc
  2. ===================================================================
  3. --- sites/all/modules/contrib/filefield/filefield_field.inc     (révision 779)
  4. +++ sites/all/modules/contrib/filefield/filefield_field.inc     (copie de travail)
  5. @@ -281,8 +281,11 @@
  6.        // Check for default images at the widget level.
  7.        // TODO: Provide an API to ImageField to do this itself?
  8.        if (!empty($field['widget']['use_default_image']) && !empty($field['widget']['default_image']['filepath']) && $delta == 0) {
  9. +        $before = count($GLOBALS['node']->field_ouvrage_image_couverture[0]);
  10.          $items[$delta] = $field['widget']['default_image'];
  11.          $items[$delta]['default'] = TRUE;
  12. +        $after = count($GLOBALS['node']->field_ouvrage_image_couverture[0]);
  13. +        drupal_set_message('Before ' . $before . ' and after ' . $after);
  14.        }
  15.        else {
  16.          $items[$delta] = NULL;
  17. Index: index.php
  18. ===================================================================
  19. --- index.php   (révision 779)
  20. +++ index.php   (copie de travail)
  21. @@ -14,6 +14,10 @@
  22.  require_once './includes/bootstrap.inc';
  23.  drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL);
  24.  
  25. +$node = node_load(44);
  26. +$node->field_ouvrage_image_couverture = array(array('fid' => 0, 'fou' => 'vrai'));
  27. +node_save($node);
  28. +
  29.  $return = menu_execute_active_handler();
  30.  
  31.  // Menu status constants are integers; page content is a string.
RAW Paste Data