--- webform_ori/components/file.inc 2007-10-20 07:39:23.000000000 +0200 +++ webform/components/file.inc 2007-11-23 13:29:49.000000000 +0100 @@ -189,8 +189,8 @@ function _webform_render_file($component '#attributes' => $component['extra']['attributes'], '#tree' => false, // file_check_upload assumes a flat $_FILES structure. '#validate' => array( - '_webform_validate_file' => array($component['cid'], $component['name'], $component['extra']['filtering']), - '_webform_required_file' => array($component['cid'], $component['name'], $component['mandatory']), // Custom required routine. + '_webform_validate_file' => array($component['form_key'], $component['name'], $component['extra']['filtering']), + '_webform_required_file' => array($component['form_key'], $component['name'], $component['mandatory']), // Custom required routine. ), '#prefix' => '
', '#suffix' => '
', @@ -256,10 +256,10 @@ function _webform_validate_file($formele * Nothing. */ function _webform_submit_file(&$data, $component) { - if ($file = file_check_upload($component['cid'])) { + if ($file = file_check_upload($component['form_key'])) { $upload_dir = variable_get('file_directory_path', 'files') ."/webform/". $component['extra']['savelocation']; if (file_check_directory($upload_dir, FILE_CREATE_DIRECTORY)) { - $file_saved = file_save_upload($component['cid'], variable_get('file_directory_path', 'files') ."/webform/". $component['extra']['savelocation']); + $file_saved = file_save_upload($component['form_key'], variable_get('file_directory_path', 'files') ."/webform/". $component['extra']['savelocation']); if (!$file_saved) { drupal_set_message(t("The uploaded file %filename was unable to be saved. The destination directory may not be writable.", array('%filename' => $data)), "error"); $data = serialize(array('error' => 'Error while uploading file'));