? 551880_password_reset_under_maintenance_second_try.patch
? 609152-3.patch
? 609152-3b.patch
? Maximum_Respect_3_1.patch
? Maximum_Respect_3_2.patch
? update_warning-609152-2.patch
? sites/default/files
? sites/default/private
? sites/default/settings.php
Index: includes/file.inc
===================================================================
RCS file: /cvs/drupal/drupal/includes/file.inc,v
retrieving revision 1.197
diff -u -p -r1.197 file.inc
--- includes/file.inc	18 Oct 2009 18:36:24 -0000	1.197
+++ includes/file.inc	23 Oct 2009 16:43:16 -0000
@@ -1380,28 +1380,29 @@ function file_validate_is_image(stdClass
  *
  * @see hook_file_validate()
  */
-function file_validate_image_resolution(stdClass $file, $maximum_dimensions = 0, $minimum_dimensions = 0) {
+function file_validate_image_resolution(stdClass $file, $maximum_dimensions = '0x0', $minimum_dimensions = '0x0') {
   $errors = array();
 
   // Check first that the file is an image.
   if ($info = image_get_info($file->uri)) {
     if ($maximum_dimensions) {
-      // Check that it is smaller than the given dimensions.
-      list($width, $height) = explode('x', $maximum_dimensions);
-      if ($info['width'] > $width || $info['height'] > $height) {
-        // Try to resize the image to fit the dimensions.
-        if ($image = image_load($file->uri)) {
-          image_scale($image, $width, $height);
-          image_save($image);
-          $file->filesize = $image->info['file_size'];
-          drupal_set_message(t('The image was resized to fit within the maximum allowed dimensions of %dimensions pixels.', array('%dimensions' => $maximum_dimensions)));
-        }
-        else {
-          $errors[] = t('The image is too large; the maximum dimensions are %dimensions pixels.', array('%dimensions' => $maximum_dimensions));
+      if ($maximum_dimensions != '0x0') {
+        // Check that it is smaller than the given dimensions.
+        list($width, $height) = explode('x', $maximum_dimensions);
+        if ($info['width'] > $width || $info['height'] > $height) {
+          // Try to resize the image to fit the dimensions.
+          if ($image = image_load($file->uri)) {
+            image_scale($image, $width, $height);
+            image_save($image);
+            $file->filesize = $image->info['file_size'];
+            drupal_set_message(t('The image was resized to fit within the maximum allowed dimensions of %dimensions pixels.', array('%dimensions' => $maximum_dimensions)));
+          }
+          else {
+            $errors[] = t('The image is too large; the maximum dimensions are %dimensions pixels.', array('%dimensions' => $maximum_dimensions));
+          }
         }
       }
     }
-
     if ($minimum_dimensions) {
       // Check that it is larger than the given dimensions.
       list($width, $height) = explode('x', $minimum_dimensions);
@@ -1410,7 +1411,6 @@ function file_validate_image_resolution(
       }
     }
   }
-
   return $errors;
 }
 
Index: modules/upload/upload.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/upload/upload.module,v
retrieving revision 1.265
diff -u -p -r1.265 upload.module
--- modules/upload/upload.module	20 Oct 2009 00:55:29 -0000	1.265
+++ modules/upload/upload.module	23 Oct 2009 16:43:18 -0000
@@ -562,14 +562,24 @@ function _upload_form($node) {
 
   if (user_access('upload files')) {
     $limits = _upload_file_limits($user);
-
     $limit_description = t('The maximum size of file uploads is %filesize.', array('%filesize' => format_size($limits['file_size']))) . ' ';
     if (!empty($limits['resolution'])) {
-      if (image_get_toolkit()) {
-        $limit_description .= t('Images larger than %resolution will be resized.', array('%resolution' => $limits['resolution'])) . ' ';
-      }
-      else {
-        $limit_description .= t('Images may not be larger than %resolution.', array('%resolution' => $limits['resolution'])) . ' ';
+      if ($limits['resolution'] != '0x0') {
+        if (image_get_toolkit()) {
+          list($width, $height) = explode('x', $limits['resolution']);
+          if ($width == 0){
+            $limit_description .= t('Images greater than %height in height will be resized. ', array('%height' => $height . 'px'));
+          }
+          elseif ($height == 0){
+            $limit_description .= t('Images greater than %width in width will be resized. ', array('%width' => $width . 'px'));
+          }
+          else{
+            $limit_description .= t('Images larger than %width by %height (w x h) will be resized. ', array('%width' => $width . 'px', '%height' => $height . 'px'));
+          }
+        }
+        else {
+          $limit_description .= t('Images may not be larger than %resolution.', array('%resolution' => $limits['resolution'])) . ' ';
+        }
       }
     }
     $limit_description .= t('Only files with the following extensions may be uploaded: %extensions.', array('%extensions' => $limits['extensions'])) . ' ';
