function bpn_flickr_photos_state in Bulk File Nodes 7
Form submission handler for bpn_flickr_form_step_2().
See also
bpn_flickr_form_step_2_submit()
1 string reference to 'bpn_flickr_photos_state'
- bpn_flickr_form_step_2 in modules/
bpn_flickr/ bpn_flickr.module - Form constructor for Step 2: Pick what images to load.
File
- modules/
bpn_flickr/ bpn_flickr.module, line 300 - Hooks and functions for the bpn_flickr module.
Code
function bpn_flickr_photos_state($form, &$form_state) {
if (empty($form_state['checked_photos'])) {
$form_state['checked_photos'] = array_keys($form_state['values']['photostream'], 1);
}
else {
$currently_checked = array_keys($form_state['values']['photostream'], 1);
$unique_merged = array_unique(array_merge($form_state['checked_photos'], $currently_checked));
$form_state['checked_photos'] = $unique_merged;
}
$form_state['num_photos_checked'] = count($form_state['checked_photos']);
$form_state['rebuild'] = TRUE;
}