소스 검색

Now compares the user's language cookie with his preferences and corrects the cookie if they are different or it is unset

graf25 24 년 전
부모
커밋
a8dca8a7e1
1개의 변경된 파일8개의 추가작업 그리고 0개의 파일을 삭제
  1. 8 0
      src/webmail.php

+ 8 - 0
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 "<html><head>\n";