? filefield-846598.patch Index: filefield.module =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/filefield/filefield.module,v retrieving revision 1.224 diff -u -p -r1.224 filefield.module --- filefield.module 30 Jun 2010 01:37:29 -0000 1.224 +++ filefield.module 6 Jul 2010 18:22:13 -0000 @@ -355,7 +355,7 @@ function filefield_widget_upload_validat // associate the field to the file on validation. 'filefield_validate_associate_field' => array($field), 'filefield_validate_size' => array($max_filesize), - // Override core since it excludes uid 1 on the extension check. + // Override core since it excludes uid 1 on the extension check. // Filefield only excuses uid 1 of quota requirements. 'filefield_validate_extensions' => array($field['widget']['file_extensions']), ); @@ -528,7 +528,7 @@ function filefield_js($type_name, $field if (empty($field) || empty($_POST['form_build_id'])) { // Invalid request. drupal_set_message(t('An unrecoverable error occurred. The uploaded file likely exceeded the maximum file size (@size) that this server supports.', array('@size' => format_size(file_upload_max_size()))), 'error'); - print drupal_to_js(array('data' => theme('status_messages'))); + drupal_json(array('data' => theme('status_messages'))); exit; } @@ -540,7 +540,7 @@ function filefield_js($type_name, $field if (!$form) { // Invalid form_build_id. drupal_set_message(t('An unrecoverable error occurred. This form was missing from the server cache. Try reloading the page and submitting again.'), 'error'); - print drupal_to_js(array('data' => theme('status_messages'))); + print drupal_json(array('data' => theme('status_messages'))); exit; } @@ -601,7 +601,7 @@ function filefield_js($type_name, $field // For some reason, file uploads don't like drupal_json() with its manual // setting of the text/javascript HTTP header. So use this one instead. $GLOBALS['devel_shutdown'] = FALSE; - print drupal_to_js(array('status' => TRUE, 'data' => $output)); + print drupal_json(array('status' => TRUE, 'data' => $output)); exit; } @@ -878,7 +878,7 @@ function filefield_validate_is_image(&$f /** * An #upload_validators callback. Add the field to the file object. * - * This validation function adds the field to the file object for later + * This validation function adds the field to the file object for later * use in field aware modules implementing hook_file. It's not truly a * validation at all, rather a convient way to add properties to the uploaded * file.