You are here

function filehash_bulk_submit in File Hash 7

Submit callback for File Hash bulk generate.

File

./filehash.admin.inc, line 46
File Hash configuration.

Code

function filehash_bulk_submit($form, &$form_state) {
  if (!filehash_algos()) {
    drupal_set_message(t('You have no enabled hash algorithms. Nothing to do.'));
    return;
  }
  batch_set(array(
    'operations' => array(
      array(
        'filehash_bulk_process',
        array(),
      ),
    ),
    'finished' => 'filehash_bulk_finished',
    'title' => t('Generating file hashes'),
    'init_message' => t('File hash generation is starting.'),
    'progress_message' => t('Please wait...'),
    'error_message' => t('File hash generation has encountered an error.'),
    'file' => drupal_get_path('module', 'filehash') . '/filehash.admin.inc',
  ));
}