--- imagefield.module	2008-01-04 12:06:44.000000000 +0800
+++ imagefield.module	2007-12-30 01:39:17.000000000 +0800
@@ -344,20 +344,6 @@ function imagefield_widget_settings($op,
         '#description' => 
         t('The maximum allowed image size expressed as WIDTHxHEIGHT (e.g. 640x480). Set to 0 for no restriction.')
       );
-      $form['max_filesize'] = array (
-        '#type' => 'textfield', 
-        '#title' => t('Maximum filesize for Images'), 
-        '#default_value' => $widget['max_filesize'] ? $widget['max_filesize'] : 0,
-        '#size' => 6, 
-        '#description' => t('The maximum allowed image file size expressed in kilobytes. Set to 0 for no restriction.')
-      );
-      $form['max_number_images'] = array (
-        '#type' => 'textfield', 
-        '#title' => t('Maximum number of images'), 
-        '#default_value' => $widget['max_number_images'] ? $widget['max_number_images'] : 0,
-        '#size' => 4, 
-        '#description' => t('The maximum number of images allowed. Set to 0 for no restriction.')
-      );
       $form['image_path'] = array(
         '#type' => 'textfield', 
         '#title' => t('Image path'), 
@@ -398,7 +384,7 @@ function imagefield_widget_settings($op,
       break;
 
     case 'save':
-      return array('max_resolution', 'max_filesize', 'max_number_images', 'image_path', 'file_extensions', 'custom_alt', 'custom_title');
+      return array('max_resolution', 'image_path', 'file_extensions', 'custom_alt', 'custom_title');
   }
 }
 
@@ -786,23 +772,6 @@ function _imagefield_widget_upload_valid
     }
   }
 
-  // If max filesize is set
-  if (!empty($field['widget']['max_filesize'])) {
-    if ($file['filesize'] > ($field['widget']['max_filesize'] * 1024)) {
-      form_set_error($field['field_name'], t('The file you uploaded has a filesize greater than the maximum allowed filesize of %sizekb.', array('%size' => $field['widget']['max_filesize'])));
-      $valid = FALSE;
-    }
-  }
-
-  // If max number of images is set
-  if (!empty($field['widget']['max_number_images'])) {
-    $count = count($items) + count($_SESSION['imagefield'][$field['field_name']]);
-    if ($count >= $field['widget']['max_number_images']) {
-      form_set_error($field['field_name'], t('You are only allowed to upload up to %maximages images.', array('%maximages' => $field['widget']['max_number_images'])));
-      $valid = FALSE;
-    }
-  }
-
   // is the mime type a match for image.
   if (strpos($file['filemime'], 'image/') !== 0) {
     // sorry no it isn't. do not pass go, do not collect $200.
