You are here

function media_admin_rebuild_types_batch_op in D7 Media 7

Batch operation for fixing the file_managed table for media, adding type values where no value exists.

1 string reference to 'media_admin_rebuild_types_batch_op'
media_admin_rebuild_types_form_submit in includes/media.admin.inc

File

includes/media.admin.inc, line 645
This file contains the admin functions for the Media module.

Code

function media_admin_rebuild_types_batch_op($total, &$context) {
  $per_run = media_variable_get('media_type_batch_update_per_run', 100);
  $context['results'] = array_merge($context['results'], media_type_batch_update(FALSE, $per_run));
  $context['finished'] = count($context['results']) / $total;
}