Index: imagefield.module =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/imagefield/imagefield.module,v retrieving revision 1.30.2.6.2.43 diff -u -p -r1.30.2.6.2.43 imagefield.module --- imagefield.module 21 Feb 2008 11:44:54 -0000 1.30.2.6.2.43 +++ imagefield.module 25 Feb 2008 03:22:30 -0000 @@ -638,8 +638,12 @@ function _imagefield_widget_form($node, '#suffix' => '', '#weight' => 100, ); - - if ($field['multiple'] && count($items) < $field['widget']['max_number_images']) { + + //Series of tests to see if we're allowed to add a new image + $allowed = ($field['multiple'] && count($items) < $field['widget']['max_number_images'] ? TRUE : $allowed); + $allowed = ($field['multiple'] && 0 == $field['widget']['max_number_images'] ? TRUE : $allowed); + $allowed = (!$field['multiple'] && count($items) < 1 ? TRUE : $allowed); + if ($allowed) { // Seperate from tree becase of that silly things won't be // displayed if they are a child of '#type' = form issue $form[$fieldname]['new'][$fieldname .'_upload'] = array( @@ -663,7 +667,12 @@ function _imagefield_widget_form($node, else { $form[$fieldname]['#prefix'] = '