You are here

function domain_locale_languages_delete_submit in Domain Locale 6

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

Additional submit handler for locale_languages_overview_form Removes disabled languages from domain_locale table

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

File

./domain_locale.module, line 282
domain_locale Domain Locale: manage languages Provides domain specific language settings

Code

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