diff options
author | Simon L'nu <simon.lnu@gmail.com> | 2012-05-13 18:50:04 -0400 |
---|---|---|
committer | Simon L'nu <simon.lnu@gmail.com> | 2012-05-13 18:50:04 -0400 |
commit | 39c042f4ea33abd77d6431c531b6eae72f2d7994 (patch) | |
tree | 91cef4041bbdfbc1fe08ffb08c52661d70c59f94 /include | |
parent | f267a283b46edaf389e99ef3ea4341a5a0496aab (diff) | |
parent | 303856ce01983feec95539892a908b5d5a88f866 (diff) | |
download | volse-hubzilla-39c042f4ea33abd77d6431c531b6eae72f2d7994.tar.gz volse-hubzilla-39c042f4ea33abd77d6431c531b6eae72f2d7994.tar.bz2 volse-hubzilla-39c042f4ea33abd77d6431c531b6eae72f2d7994.zip |
Merge branch 'master', remote-tracking branch 'remotes/upstream/master'
* remotes/upstream/master:
diabook-theme: small fixes
rename get_language() to get_browser_language()
slackr drop shadows
language detection library
rev update
* master:
Diffstat (limited to 'include')
-rw-r--r-- | include/pgettext.php | 6 | ||||
-rwxr-xr-x | include/security.php | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/include/pgettext.php b/include/pgettext.php index a079a4687..5a0eab0b0 100644 --- a/include/pgettext.php +++ b/include/pgettext.php @@ -15,10 +15,10 @@ */ -if(! function_exists('get_language')) { -function get_language() { +if(! function_exists('get_browser_language')) { +function get_browser_language() { - if (isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])) { + if (x($_SERVER,'HTTP_ACCEPT_LANGUAGE')) { // break up string into pieces (languages and q factors) preg_match_all('/([a-z]{1,8}(-[a-z]{1,8})?)\s*(;\s*q\s*=\s*(1|0\.[0-9]+))?/i', $_SERVER['HTTP_ACCEPT_LANGUAGE'], $lang_parse); diff --git a/include/security.php b/include/security.php index a92400b5c..af201d2af 100755 --- a/include/security.php +++ b/include/security.php @@ -76,7 +76,7 @@ function authenticate_success($user_record, $login_initial = false, $interactive header('X-Account-Management-Status: active; name="' . $a->user['username'] . '"; id="' . $a->user['nickname'] .'"'); if($login_initial) { - $l = get_language(); + $l = get_browser_language(); q("UPDATE `user` SET `login_date` = '%s', `language` = '%s' WHERE `uid` = %d LIMIT 1", dbesc(datetime_convert()), |