You are here

function imagefield_crop_preset_delete_confirm_submit in Imagefield Crop 7.3

Execute preset deletion

File

./imagefield_crop.module, line 1332

Code

function imagefield_crop_preset_delete_confirm_submit($form, &$form_state) {
  if ($form_state['values']['confirm']) {
    $preset = $form['#preset'];
    db_delete('imagefield_crop_preset')
      ->condition('pid', $preset->pid)
      ->execute();
    drupal_set_message(t('The entity %title (ID %id) has been deleted', array(
      '%title' => $preset->name,
      '%id' => $preset->pid,
    )));
    $form_state['redirect'] = '/admin/config/media/imagefield-crop-preset-list';
  }
}