You are here

function _site_disclaimer_checkbox_label_all_translations in Site Disclaimer 6

Same name and namespace in other branches
  1. 7 site_disclaimer.admin.inc \_site_disclaimer_checkbox_label_all_translations()

Get an associative array keyed by langcode of all checkbox label translations.

1 call to _site_disclaimer_checkbox_label_all_translations()
_site_disclaimer_prep_allowed_paths in ./site_disclaimer.admin.inc
Create 'site_disclaimer_allow_nodes' variable from links found in:

File

./site_disclaimer.admin.inc, line 14
Administration settings for Site Disclaimer module.

Code

function _site_disclaimer_checkbox_label_all_translations() {
  $ret = array();
  if (module_exists('i18n')) {
    $result = db_query("SELECT * FROM {i18n_variable} WHERE name='%s'", 'site_disclaimer_checkbox_label');
    while ($variable = db_fetch_object($result)) {

      // Ignore default settings (it is in one of the language variables)
      if ($variable->language) {
        $ret[$variable->language] = filter_xss_admin(unserialize($variable->value));
      }
    }
  }
  else {
    global $language;
    $ret[$language->language] = filter_xss_admin(variable_get('site_disclaimer_checkbox_label', SITE_DISCLAIMER_DEFAULT_CHECKBOX_LABEL));
  }
  return $ret;
}