From 18f045bf35ebc5ff9cfb8ef79a0a3318db1b6903 Mon Sep 17 00:00:00 2001 From: plegall Date: Tue, 30 Sep 2014 08:23:34 +0000 Subject: 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 --- include/user.inc.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'include/user.inc.php') diff --git a/include/user.inc.php b/include/user.inc.php index d1bf87c70..4de5cc6c3 100644 --- a/include/user.inc.php +++ b/include/user.inc.php @@ -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); ?> -- cgit v1.2.3