From cf47d3639c3b0845b5643bed6b85e4525c32cb13 Mon Sep 17 00:00:00 2001 From: graf25 Date: Fri, 9 Feb 2001 19:20:13 +0000 Subject: [PATCH] Now compares the user's language cookie with his preferences and corrects the cookie if they are different or it is unset git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@1096 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- src/webmail.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/webmail.php b/src/webmail.php index 95e2f41d..ae497bad 100644 --- a/src/webmail.php +++ b/src/webmail.php @@ -44,6 +44,14 @@ include ('../src/load_prefs.php'); // We'll need this to later have a noframes version + // + // Check if the user has a language preference, but no cookie. + // Send him a cookie with his language preference, if there is + // such discrepancy. + $my_language=getPref($data_dir, $username, "language"); + if ($my_language != $squirrelmail_language) + setcookie('squirrelmail_language', $my_language, time()+2592000); + set_up_language(getPref($data_dir, $username, 'language')); echo "\n"; -- 2.25.1