You are here

function mail_edit_trans_delete in Mail Editor 6

1 string reference to 'mail_edit_trans_delete'
mail_edit_trans in ./mail_edit.admin.inc

File

./mail_edit.admin.inc, line 442
Administrative interface for the Mail Editor module.

Code

function mail_edit_trans_delete($form, &$form_state) {
  $query = "DELETE FROM {mail_edit} WHERE id = '%s' AND language = '%s'";
  $args[] = $form_state['values']['id'];
  $args[] = $form_state['values']['language'];
  $variables = array(
    '%language' => $form_state['values']['language'],
    '%id' => $form_state['values']['id'],
  );
  if (db_query($query, $args)) {
    drupal_set_message(t('%language translation of %id has been removed', $variables));
  }
  else {
    drupal_set_message(t('Failed to remove %language translation of %id', $variables));
  }
  $form_state['redirect'] = 'admin/build/mail-edit';
}