? .project
? sites/default/.DS_Store
? sites/default/files
? sites/default/private
? sites/default/settings.php
Index: modules/upload/upload.admin.css
===================================================================
RCS file: modules/upload/upload.admin.css
diff -N modules/upload/upload.admin.css
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ modules/upload/upload.admin.css	17 Aug 2009 20:51:56 -0000
@@ -0,0 +1,14 @@
+div.form-item-resolution .description {
+  clear: both;
+}
+div.form-item-resolution .form-item-textfield {
+  float: left;
+}
+div.form-item-resolution .form-item-textfield label {
+  font-weight: normal;
+  font-size: 0.85em;
+  color: #898989;
+}
+div.form-item-resolution .upload-max-resolution-x-wrapper .field-suffix {
+  margin-right: 0.25em;
+}
Index: modules/upload/upload.admin.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/upload/upload.admin.inc,v
retrieving revision 1.12
diff -u -p -r1.12 upload.admin.inc
--- modules/upload/upload.admin.inc	21 May 2009 12:00:06 -0000	1.12
+++ modules/upload/upload.admin.inc	17 Aug 2009 20:51:56 -0000
@@ -10,10 +10,11 @@
  * Form API callback to validate the upload settings form.
  */
 function upload_admin_settings_validate($form, &$form_state) {
-  if (($form_state['values']['upload_max_resolution'] != '0')) {
-    if (!preg_match('/^[0-9]+x[0-9]+$/', $form_state['values']['upload_max_resolution'])) {
-      form_set_error('upload_max_resolution', t('The maximum allowed image size expressed as WIDTHxHEIGHT (e.g. 640x480). Set to 0 for no restriction.'));
-    }
+  if (!is_numeric($form_state['values']['upload_max_resolution_x'])) {
+    form_set_error('upload_max_resolution_x', t('The maximum allowed image width should be entered as a numeric value. Set to 0 for no restriction.'));
+  }
+  if (!is_numeric($form_state['values']['upload_max_resolution_y'])) {
+    form_set_error('upload_max_resolution_y', t('The maximum allowed image height should be entered as a numeric value. Set to 0 for no restriction.'));
   }
 
   $default_uploadsize = $form_state['values']['upload_uploadsize_default'];
@@ -68,15 +69,32 @@ function upload_admin_settings() {
     '#type' => 'fieldset',
     '#title' => t('General settings'),
     '#collapsible' => TRUE,
+    '#attached_css' => array(
+      drupal_get_path('module', 'upload') . '/upload.admin.css',
+    ),
   );
   $form['settings_general']['upload_max_resolution'] = array(
-    '#type' => 'textfield',
+    '#type' => 'item',
     '#title' => t('Maximum resolution for uploaded images'),
-    '#default_value' => variable_get('upload_max_resolution', 0),
-    '#size' => 15,
-    '#maxlength' => 10,
-    '#description' => t('The maximum allowed image size (e.g. 640x480). Set to 0 for no restriction. If an <a href="!image-toolkit-link">image toolkit</a> is installed, files exceeding this value will be scaled down to fit.', array('!image-toolkit-link' => url('admin/settings/image-toolkit'))),
-    '#field_suffix' => '<kbd>' . t('WIDTHxHEIGHT') . '</kbd>'
+    '#description' => t('The maximum allowed image size (e.g. 640x480). Set to 0x0 for no restriction. If an <a href="!image-toolkit-link">image toolkit</a> is installed, files exceeding this value will be scaled down to fit.', array('!image-toolkit-link' => url('admin/settings/image-toolkit'))),
+    '#prefix' => '<div class="form-item-wrapper form-item-resolution">',
+    '#suffix' => '</div>',
+  );
+  $form['settings_general']['upload_max_resolution']['upload_max_resolution_x'] = array(
+    '#type' => 'textfield',
+    '#title' => t('Width'),
+    '#default_value' => variable_get('upload_max_resolution_x', 0),
+    '#size' => 5,
+    '#maxlength' => 5,
+    '#field_suffix' => t('x'),
+  );
+  $form['settings_general']['upload_max_resolution']['upload_max_resolution_y'] = array(
+    '#type' => 'textfield',
+    '#title' => t('Height'),
+    '#default_value' => variable_get('upload_max_resolution_y', 0),
+    '#size' => 5,
+    '#maxlength' => 5,
+    '#field_suffix' => t('px'),
   );
   $form['settings_general']['upload_list_default'] = array(
     '#type' => 'select',
Index: modules/upload/upload.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/upload/upload.module,v
retrieving revision 1.247
diff -u -p -r1.247 upload.module
--- modules/upload/upload.module	17 Aug 2009 19:14:41 -0000	1.247
+++ modules/upload/upload.module	17 Aug 2009 20:51:57 -0000
@@ -142,7 +142,7 @@ function _upload_file_limits($user) {
     'extensions' => $all_extensions,
     'file_size' => $file_limit,
     'user_size' => $user_limit,
-    'resolution' => variable_get('upload_max_resolution', 0),
+    'resolution' => variable_get('upload_max_resolution_x', 0) . 'x' . variable_get('upload_max_resolution_y', 0),
   );
 }
 
Index: modules/upload/upload.test
===================================================================
RCS file: /cvs/drupal/drupal/modules/upload/upload.test,v
retrieving revision 1.23
diff -u -p -r1.23 upload.test
--- modules/upload/upload.test	17 Aug 2009 19:14:41 -0000	1.23
+++ modules/upload/upload.test	17 Aug 2009 20:51:57 -0000
@@ -177,7 +177,7 @@ class UploadTestCase extends DrupalWebTe
     $edit = array();
     foreach ($settings as $key => $value) {
       $edit[$key . '_default'] = $value;
-      if ($rid !== NULL && $key != 'upload_list' && $key != 'upload_max_resolution') {
+      if ($rid !== NULL && $key != 'upload_list' && $key != 'upload_max_resolution_x' && $key != 'upload_max_resolution_y') {
         $edit[$key . '_' . $rid] = $value;
       }
     }
