summaryrefslogtreecommitdiff
path: root/lib/util.php
diff options
context:
space:
mode:
authorSarven Capadisli <csarven@status.net>2010-03-03 15:31:44 -0500
committerSarven Capadisli <csarven@status.net>2010-03-03 15:31:44 -0500
commit13713a09bbb2cac0c82c2d6602c8820662740218 (patch)
tree07402e6428664dea5b8c0b255e3b50eab0d63d13 /lib/util.php
parentd3c1888256e32495cb0db9065ff7a03e105299a3 (diff)
parentc7d390e4949b28c28c95375bfe4523de05af7808 (diff)
Merge branch 'testing' of git@gitorious.org:statusnet/mainline into 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...