function media_admin_rebuild_types_form in D7 Media 7
Confirmation form for rebuliding the file_managed table to include type in rows where there is no type.
1 string reference to 'media_admin_rebuild_types_form'
- media_menu in ./
media.module - Implement of hook_menu().
File
- includes/
media.admin.inc, line 606 - This file contains the admin functions for the Media module.
Code
function media_admin_rebuild_types_form($form, &$form_state) {
$total = media_type_invalid_files_count();
if ($total == 0) {
media_variable_del('show_file_type_rebuild_nag');
// @TODO: Make this not sound stupid.
drupal_set_message(t('All files in the system have been assigned types. Media installation complete.'));
drupal_goto('admin');
}
$form['total'] = array(
'#type' => 'value',
'#value' => $total,
);
return confirm_form($form, t('Update types for existing files'), 'admin/config/media', t('This process is required when installing media on an existing site. Media needs to scan through existing files and identify the file type. <br/><strong>Update types for @file files?</strong>', array(
'@total' => $total,
)));
}