You are here

function radioactivity_admin_delete_profile_form_submit in Radioactivity 5

Same name and namespace in other branches
  1. 6 radioactivity-admin-ui.inc \radioactivity_admin_delete_profile_form_submit()

File

./radioactivity.module, line 397

Code

function radioactivity_admin_delete_profile_form_submit($form_id, $form) {
  $dpid = $form['decay_profile_id'];
  drupal_set_message(t("Deleted profile @id", array(
    '@id' => $dpid,
  )));
  $decay_profiles = _radioactivity_get_decay_profiles();
  unset($decay_profiles[$dpid]);
  _radioactivity_set_decay_profiles($decay_profiles);
  db_query("DELETE FROM {radioactivity} WHERE decay_profile=%d", $dpid);
  drupal_goto("admin/settings/radioactivity");
}