locale_admin_string_delete

Delete a string.

1 string reference to 'locale_admin_string_delete'

File

modules/locale.module, line 412
Enables administrators to manage the site interface languages.

Code

function locale_admin_string_delete($lid) {
  $form = array();
  $string = db_result(db_query("SELECT source FROM {locales_source} WHERE lid = %d", $lid));

  if ($string) {
    $form['lid'] = array(
      '#type' => 'value',
      '#value' => $lid,
    );
    $form['string'] = array(
      '#type' => 'item',
      '#value' => check_plain($string, 150, FALSE, TRUE),
    );
    return confirm_form('locale_string_delete_confirm', 
                    $form, 
                    t('Are you sure you want to delete the following string?'), 
                    'admin/locale/string/search', 
                    '', 
                    t('Delete'), 
                    t('Cancel'));
  }
  else {
    drupal_not_found();
  }
}
Login or register to post comments