fix language parser regex

This commit is contained in:
Dietmar Maurer 2012-03-14 12:02:32 +01:00
parent 1fcc2d4bed
commit 322ce4c4ce

View File

@ -32,7 +32,7 @@ my $token = 'null';
if (my $cookie = $r->headers_in->{Cookie}) {
if (my $newlang = ($cookie =~ /(?:^|\s)PVELangCookie=([^;]*)/)[0]) {
if ($newlang =~ m/^[a-z]{2,3}(_A-Z{2,3})?$/) {
if ($newlang =~ m/^[a-z]{2,3}(_[A-Z]{2,3})?$/) {
$lang = $newlang;
}
}