Now compares the user's language cookie with his preferences and corrects the cookie...
authorgraf25 <graf25@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Fri, 9 Feb 2001 19:20:13 +0000 (19:20 +0000)
committergraf25 <graf25@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Fri, 9 Feb 2001 19:20:13 +0000 (19:20 +0000)
git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@1096 7612ce4b-ef26-0410-bec9-ea0150e637f0

src/webmail.php

index 95e2f41daaed8e9287e0828bba645322f4baf6d5..ae497bad6a0fb1c47936ffee559b987dbe1e6c2e 100644 (file)
    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 "<html><head>\n";