summaryrefslogtreecommitdiff
path: root/lib/util.php
diff options
context:
space:
mode:
authorEvan Prodromou <evan@status.net>2010-03-03 18:20:45 -0500
committerEvan Prodromou <evan@status.net>2010-03-03 18:20:45 -0500
commit0f1c6e239acbf2c024c3aae9819d891f02b05bfd (patch)
tree42e923d0b8dd35ca2592a68a4dd26e686361b4c2 /lib/util.php
parent13521cb510f2377e9b865b0506f92ada9ef9b3cd (diff)
parent4103e8584c7ccfb444af0814345104afedd2c6fc (diff)
Merge branch 'testing'
Diffstat (limited to 'lib/util.php')
-rw-r--r--lib/util.php12
1 files changed, 7 insertions, 5 deletions
diff --git a/lib/util.php b/lib/util.php
index 46be920fa..da2799d4f 100644
--- a/lib/util.php
+++ b/lib/util.php
@@ -105,11 +105,13 @@ function common_language()
// Otherwise, find the best match for the languages requested by the
// user's browser...
- $httplang = isset($_SERVER['HTTP_ACCEPT_LANGUAGE']) ? $_SERVER['HTTP_ACCEPT_LANGUAGE'] : null;
- if (!empty($httplang)) {
- $language = client_prefered_language($httplang);
- if ($language)
- return $language;
+ if (common_config('site', 'langdetect')) {
+ $httplang = isset($_SERVER['HTTP_ACCEPT_LANGUAGE']) ? $_SERVER['HTTP_ACCEPT_LANGUAGE'] : null;
+ if (!empty($httplang)) {
+ $language = client_prefered_language($httplang);
+ if ($language)
+ return $language;
+ }
}
// Finally, if none of the above worked, use the site's default...