You are here

function locale_admin_string_delete in Drupal 4

Delete a string.

1 string reference to 'locale_admin_string_delete'
locale_menu in modules/locale.module
Implementation of hook_menu().

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();
  }
}