diff options
author | vdigital <vdigital@piwigo.org> | 2008-05-31 11:43:13 +0000 |
---|---|---|
committer | vdigital <vdigital@piwigo.org> | 2008-05-31 11:43:13 +0000 |
commit | 6d8c172ee2e06b2f9e14f9189273403a990cdefa (patch) | |
tree | 44ceb3d753a5242fe58379ff020c49cd904c5640 /include/user.inc.php | |
parent | 93a4c7a150346956c8a53a0255d1e4ed6c334260 (diff) |
Feature 0000080: Browser language detection (Use first active browser language as language for guest, generic members, registering process). If the language is not available PHPWG_DEFAULT_LANGUAGE is used as previously.
git-svn-id: http://piwigo.org/svn/trunk@2371 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to 'include/user.inc.php')
-rw-r--r-- | include/user.inc.php | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/include/user.inc.php b/include/user.inc.php index b267790f8..1cb9ce7c0 100644 --- a/include/user.inc.php +++ b/include/user.inc.php @@ -69,6 +69,9 @@ if ($conf['apache_authentication'] and isset($_SERVER['REMOTE_USER'])) $user = build_user( $user['id'], ( defined('IN_ADMIN') and IN_ADMIN ) ? false : true // use cache ? ); - +if (is_a_guest() or is_generic()) +{ + $user['language'] = get_default_language(); +} trigger_action('user_init', $user); ?> |