Commit d510b348 authored by quicksketch's avatar quicksketch

#468554: Limit amount of Default images shown to one only.

parent 5f7d9ee3
......@@ -261,7 +261,7 @@ function filefield_field_sanitize($node, $field, &$items, $teaser, $page) {
if (empty($item['fid']) || !empty($item['delete'])) {
// 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'])) {
if (!empty($field['widget']['use_default_image']) && !empty($field['widget']['default_image']['filepath']) && $delta == 0) {
$items[$delta] = $field['widget']['default_image'];
$items[$delta]['default'] = TRUE;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment