You are here

function spaces_preset_delete in Spaces 6

Same name and namespace in other branches
  1. 5.2 spaces_admin.inc \spaces_preset_delete()
  2. 6.3 spaces.module \spaces_preset_delete()
  3. 6.2 spaces_admin.inc \spaces_preset_delete()
  4. 7.3 spaces.module \spaces_preset_delete()
  5. 7 spaces.module \spaces_preset_delete()
1 call to spaces_preset_delete()
spaces_preset_delete_form_submit in ./spaces_admin.inc

File

./spaces_admin.inc, line 396

Code

function spaces_preset_delete($type, $preset) {
  $success = db_query("DELETE FROM {spaces_presets} WHERE type = '%s' AND id = '%s'", $type, $preset);
  $message = $success ? t('The preset !preset was deleted successfully.', array(
    '!preset' => $preset,
  )) : t('An error occurred while trying to delete !preset.', array(
    '!preset' => $preset,
  ));
  drupal_set_message($message);
}