]> code.citadel.org Git - citadel.git/blobdiff - webcit/context_loop.c
* Store the language setting in the session cookie instead of as a preference. Resol...
[citadel.git] / webcit / context_loop.c
index 72b5882ee11da3641b3a0a8d5c56b07b47fd8d92..50334cea88eb3fbe1de1d9c6a1ba5bd5794d7eb8 100644 (file)
@@ -354,6 +354,7 @@ int ReadHTTPRequset (ParsedHttpHdrs *Hdr)
                        continue;
                }
                if (nLine == 1) {
+                       lprintf(9, "%s\n", ChrPtr(Line));
                        isbogus = ReadHttpSubject(Hdr, Line, HeaderName);
                        if (isbogus) break;
                        continue;
@@ -539,6 +540,12 @@ TODO    HKEY("/static/nocookies.html?force_close_session=yes"));
                TheSession->is_mobile = -1;
                SessionList = TheSession;
                pthread_mutex_unlock(&SessionListMutex);
+
+               if (StrLength(Hdr.c_language) > 0) {
+                       lprintf(9, "Session cookie requests language '%s'\n", ChrPtr(Hdr.c_language));
+                       set_selected_language(ChrPtr(Hdr.c_language));
+                       go_selected_language();
+               }
        }
 
        /*