Form submission handler for picture_action_confirm().
function picture_mapping_action_confirm_submit($form, &$form_state) {
$picture_mapping = $form_state['picture_mapping'];
$action = $form_state['values']['action'];
$picture_mapping
->{$action}();
$verb = '';
switch ($action) {
case 'delete':
$verb = 'deleted';
break;
}
drupal_set_message(t('Picture mapping %label has been @action.', array(
'%label' => $picture_mapping
->label(),
'@action' => $verb,
)));
watchdog('picture', 'Picture mapping %label has been @action.', array(
'%label' => $picture_mapping
->label(),
'@action' => $verb,
), WATCHDOG_NOTICE);
$form_state['redirect'] = 'admin/config/media/picturemapping';
}