function fupload_empty_queue in Image FUpload 6.3
Same name and namespace in other branches
- 6 image_fupload.module \fupload_empty_queue()
- 6.2 image_fupload.module \fupload_empty_queue()
1 string reference to 'fupload_empty_queue'
- image_fupload_menu in ./
image_fupload.module - Implementation of hook_menu().
File
- ./
image_fupload.module, line 214
Code
function fupload_empty_queue($field_name) {
global $user;
// Set "processed" flag so that these images aren't processed again; images are deleted later by cron (--> temporary files)
db_query("UPDATE {files} SET filename = '%s' WHERE uid = %d AND status = %d AND filename = '%s'", image_fupload_image_status(check_plain($field_name), IMAGE_PROCESSED), $user->uid, FILE_STATUS_TEMPORARY, image_fupload_image_status(check_plain($field_name), IMAGE_UNMACHINED));
// Output message to user via AJAX
drupal_set_message();
drupal_set_message(t('All queued images were deleted.'), 'warning');
drupal_json(array(
'status' => TRUE,
'data' => theme('status_messages'),
));
}