You are here

function domain_locale_languages_delete_submit in Domain Locale 7

Same name and namespace in other branches
  1. 6 domain_locale.module \domain_locale_languages_delete_submit()

Additional submit handler for locale_languages_overview_form().

Removes disabled languages from domain_locale table.

See also

domain_locale_form_alter()

1 string reference to 'domain_locale_languages_delete_submit'
domain_locale_form_alter in ./domain_locale.module
Implements hook_form_alter().

File

./domain_locale.module, line 327
Provides domain specific language settings.

Code

function domain_locale_languages_delete_submit($form, &$form_state) {
  $langcode = db_escape_table($form_state['values']['langcode']);
  $active_domains = _domain_locale_get_language_domains($langcode);
  foreach ($active_domains as $key => $domain_id) {
    domain_locale_delete_domain_language($domain_id, $langcode);
    $domain = domain_lookup($domain_id);
    watchdog('domain_locale', 'Removed deleted language code %langcode from %sitename.', array(
      '%langcode' => $langcode,
      '%sitename' => $domain['sitename'],
    ), WATCHDOG_NOTICE);
  }
}