function filefield_paths_batch_update in File (Field) Paths 6
Same name and namespace in other branches
- 8 filefield_paths.module \filefield_paths_batch_update()
- 7 filefield_paths.module \filefield_paths_batch_update()
Set batch process to update FileField Paths.
Parameters
$module: The upload widgets module ('filefield', 'upload', etc).
$field: The CCK field name - set as NULL if not applicable.
$type: The Node type ('page', 'story', etc).
1 call to filefield_paths_batch_update()
- filefield_paths_form_submit in ./
filefield_paths.module - Implements hook_form_submit().
File
- ./
filefield_paths.module, line 290 - Contains core functions for the FileField Paths module.
Code
function filefield_paths_batch_update($module, $field, $type) {
$objects = array();
// Invoke hook_filefield_paths_batch_update().
if (function_exists($function = "{$module}_filefield_paths_batch_update")) {
$function($field, str_replace('-', '_', $type), $objects);
}
// Create batch.
$batch = array(
'title' => t('Updating FileField Paths'),
'operations' => array(
array(
'_filefield_paths_batch_update_process',
array(
array_unique($objects),
$module,
$field,
),
),
),
);
batch_set($batch);
}