You are here

function clamav_filefield_widget_alter in ClamAV 6

Implementation of our custom hook_FIELDNAME_alter for filefield widget.

File

./clamav.module, line 140
Integrate ClamAV to allow uploaded files to be scanned for viruses.

Code

function clamav_filefield_widget_alter(&$field) {
  if (module_exists('filefield') && variable_get('clamav_enable_element_filefield_widget', TRUE)) {
    $field[0]['#upload_validators']['clamav_elements_filefield_validate'] = array();
  }
}