From fd56a6e269aea462a80fff730eccabd4688036e3 Mon Sep 17 00:00:00 2001 From: Yorhel Date: Thu, 23 Dec 2010 20:05:51 +0100 Subject: Store l10n preference in the database for logged-in users --- lib/VNDB/Util/Auth.pm | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'lib/VNDB/Util/Auth.pm') diff --git a/lib/VNDB/Util/Auth.pm b/lib/VNDB/Util/Auth.pm index 932a48ee..9ad76894 100644 --- a/lib/VNDB/Util/Auth.pm +++ b/lib/VNDB/Util/Auth.pm @@ -70,6 +70,10 @@ sub authLogout { $self->resRedirect('/', 'temp'); _rmcookie($self); + + # set l10n cookie if the user has a preferred language set + my $l10n = $self->authPref('l10n'); + $self->resHeader('Set-Cookie', "l10n=$l10n; expires=Sat, 01-Jan-2030 00:00:00 GMT; path=/; domain=$self->{cookie_domain}") if $l10n; } -- cgit v1.2.3