function media_browser_plus_download_action_form in Media Browser Plus 7.3
Configuration form shown to the user before the action gets executed.
@todo Replace with proper integration as soon as VBO supports non batch operations.
File
- ./
media_browser_plus.module, line 201 - Media Browser Plus - enhanced file management functions.
Code
function media_browser_plus_download_action_form($context, $form_state) {
// We hijack the whole process here because there's now way yet to skip the
// batch processing in VBO 3.1.
$vbo = _views_bulk_operations_get_field($context['view']);
$selection = _views_bulk_operations_get_selection($vbo, $form_state);
$files = file_load_multiple($selection);
// Check permissions. If one fails - stop whole operation!
if (!media_browser_plus_file_entity_access_wrapper('view', $files)) {
drupal_access_denied();
drupal_exit();
}
media_browser_plus_download_multiple_files($selection);
}