diff options
author | Gábor Hojtsy <gabor@hojtsy.hu> | 2007-07-01 19:49:19 +0000 |
---|---|---|
committer | Gábor Hojtsy <gabor@hojtsy.hu> | 2007-07-01 19:49:19 +0000 |
commit | 8caf4da7f14c4d744f5a1d24e6e284dbf57e3470 (patch) | |
tree | dab1990c960a9a374c8b390f753e42f1d80c1731 /includes/bootstrap.inc | |
parent | 7afaf32e6fa044107bae35ae6246fabefc22e972 (diff) | |
download | brdo-8caf4da7f14c4d744f5a1d24e6e284dbf57e3470.tar.gz brdo-8caf4da7f14c4d744f5a1d24e6e284dbf57e3470.tar.bz2 |
#82499 by Jose A Reyero and a little bit from myself: send emails localized in the language needed in specific situations, and centralize mail composing operations with hook_mail()
Diffstat (limited to 'includes/bootstrap.inc')
-rw-r--r-- | includes/bootstrap.inc | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/includes/bootstrap.inc b/includes/bootstrap.inc index a2aa44742..e1b28aca7 100644 --- a/includes/bootstrap.inc +++ b/includes/bootstrap.inc @@ -1030,9 +1030,17 @@ function language_list($field = 'language', $reset = FALSE) { // Init language list if (!isset($languages)) { - $result = db_query('SELECT * FROM {languages} ORDER BY weight ASC, name ASC'); - while ($row = db_fetch_object($result)) { - $languages['language'][$row->language] = $row; + if (variable_get('language_count', 1) > 1) { + $result = db_query('SELECT * FROM {languages} ORDER BY weight ASC, name ASC'); + while ($row = db_fetch_object($result)) { + $languages['language'][$row->language] = $row; + } + } + else { + // One language only, the locale tables might not even + // be in place, so use the default language only. + $default = language_default(); + $languages['language'][$default->language] = $default; } } |