You are here

function radioactivity_admin_delete_profile_form_submit in Radioactivity 6

Same name and namespace in other branches
  1. 5 radioactivity.module \radioactivity_admin_delete_profile_form_submit()

File

./radioactivity-admin-ui.inc, line 326
Radioactivity core admin UI.

Code

function radioactivity_admin_delete_profile_form_submit($form_id, $form) {
  $dpid = $form['values']['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/list_profiles");
}