Adding "default" flag to identify when default images are being displayed.
authorNathan Haug
Mon, 20 Apr 2009 22:30:08 +0000 (22:30 +0000)
committerNathan Haug
Mon, 20 Apr 2009 22:30:08 +0000 (22:30 +0000)
filefield_field.inc

index 0927742..8642419 100644 (file)
@@ -237,6 +237,7 @@ function filefield_field_sanitize($node, $field, &$items, $teaser, $page) {
       // TODO: Provide an API to ImageField to do this itself?
       if (!empty($field['widget']['use_default_image']) && !empty($field['widget']['default_image']['filepath'])) {
         $items[$delta] = $field['widget']['default_image'];
+        $items[$delta]['default'] = TRUE;
       }
       else {
         $items[$delta] = NULL;