1 file.admin.inc | file_type_classify_confirm_submit($form, &$form_state) |
Submit handler for file type classification confirmation form.
See also
File
- core/
modules/ file/ file.admin.inc, line 720 - Admin page callbacks for the File module.
Code
function file_type_classify_confirm_submit($form, &$form_state) {
$result = db_query('SELECT fid FROM {file_managed} WHERE `type` = :db_condition_placeholder', array(':db_condition_placeholder' => 'undefined'));
$fids = $result->fetchCol();
if (!empty($fids)) {
$batch = array(
'title' => t('Classifying files'),
'operations' => array(
array('file_type_classify_batch', array($fids)),
),
'progress_message' => '',
'finished' => 'file_type_classify_finished',
);
batch_set($batch);
}
else {
file_needs_type_classification(FALSE);
}
$form_state['redirect'] = 'admin/reports/status';
}