--- private_upload.module.orig	2008-07-26 02:49:36.000000000 +0200
+++ private_upload.module	2010-09-01 22:53:35.000000000 +0200
@@ -359,34 +359,29 @@ function private_upload_form_alter(&$for
           $href = _private_upload_create_url($file);
           $description = "<small>". check_plain($href) ."</small>";
           $form['attachments']['wrapper']['files'][$fid]['description'] = array(
-            '#type' => 'textfield', 
-            '#default_value' => (strlen($file->description)) ? $file->description : $file->filename, 
-            '#maxlength' => 256, 
-            '#description' => $description, 
+            '#type' => 'textfield',
+            '#default_value' => (strlen($file->description)) ? $file->description : $file->filename,
+            '#maxlength' => 256,
+            '#description' => $description,
           );
          }
-      }     
+      }
     }
-  }  
-  elseif( $form_id == 'upload_js' ) {
+  }
+  elseif ($form_id == 'upload_js') {
     $form['files']['#theme'] = 'private_upload_form';
-//    $form['#submit'][] = 'private_upload_form_submit'; // ???
-    
+
     foreach ($form['files'] as $fid => $file) {
-      if( !_private_upload_starts_with( $fid, '#' ) ) { // Ignore the properties.
-        if( $_POST['files'][$fid] ) { 
+      if (!_private_upload_starts_with($fid, '#')) { // Ignore the properties.
+        if ($_POST['files'][$fid]) {
           $private = $_POST['files'][$fid]['private'];
-          // While I am here lets fix the problem with delete and list as well.
-          // Q: Do I still need this fix in D6?
-          $form['files'][$fid]['list']['#default_value'] = $_POST['files'][$fid]['list'];
-          $form['files'][$fid]['remove']['#default_value'] = $_POST['files'][$fid]['remove'];
         }
         else { // File is a newly uploaded so set private to default.
           $private = ( variable_get( 'private_upload_default', 'private' ) == 'private' );
         }
         
         $form['files'][$fid]['private'] = array(
-            '#type' => 'checkbox', 
+            '#type' => 'checkbox',
             '#default_value' => $private,
         );
       }
