Index: includes/file.inc =================================================================== RCS file: /cvs/drupal/drupal/includes/file.inc,v retrieving revision 1.67 diff -u -r1.67 file.inc --- includes/file.inc 10 Mar 2006 19:02:06 -0000 1.67 +++ includes/file.inc 21 Mar 2006 06:20:44 -0000 @@ -185,24 +185,17 @@ // lower level system error occurred. switch ($_FILES["edit"]["error"][$source]) { - // We are not actually using the constants since they weren't introduced - // until php 4.3.0. - - // UPLOAD_ERR_OK: File uploaded successfully - case 0: + // @see http://php.net/manual/en/features.file-upload.errors.php + case UPLOAD_ERR_OK: break; - // UPLOAD_ERR_INI_SIZE: File size exceeded php.ini value - case 1: - // UPLOAD_ERR_FORM_SIZE: File size exceeded MAX_FILE_SIZE form value - case 2: + case UPLOAD_ERR_INI_SIZE: + case UPLOAD_ERR_FORM_SIZE: drupal_set_message(t('The file %file could not be saved, because it exceeds the maximum allowed size for uploads.', array('%file' => theme('placeholder', $source))), 'error'); return 0; - // UPLOAD_ERR_PARTIAL: File was only partially uploaded - case 3: - // UPLOAD_ERR_NO_FILE: No file was uploaded - case 4: + case UPLOAD_ERR_PARTIAL: + case UPLOAD_ERR_NO_FILE: drupal_set_message(t('The file %file could not be saved, because the upload did not complete.', array('%file' => theme('placeholder', $source))), 'error'); return 0;