bug 3111: cleaner code for get_browser_language (no more reference as parameter)

git-svn-id: http://piwigo.org/svn/trunk@29840 68402e56-0260-453c-a942-63ccdbb3a9ee
This commit is contained in:
plegall
2014-09-30 08:23:34 +00:00
parent 7e5722ce78
commit 18f045bf35
2 changed files with 9 additions and 17 deletions
+2 -2
View File
@@ -68,9 +68,9 @@ if ($conf['apache_authentication'])
$user = build_user( $user['id'],
( defined('IN_ADMIN') and IN_ADMIN ) ? false : true // use cache ?
);
if ($conf['browser_language'] and (is_a_guest() or is_generic()) )
if ($conf['browser_language'] and (is_a_guest() or is_generic()) and $language = get_browser_language())
{
get_browser_language($user['language']);
$user['language'] = $language;
}
trigger_notify('user_init', $user);
?>