журнал журнал (shhh) wrote in changelog,
журнал журнал
shhh
changelog

[livejournal] r21858: LJSUP-11773: XML RPC errors localization...

Committer: nnikulochkina
LJSUP-11773: XML RPC errors localization
U   trunk/cgi-bin/Apache/LiveJournal.pm
Modified: trunk/cgi-bin/Apache/LiveJournal.pm
===================================================================
--- trunk/cgi-bin/Apache/LiveJournal.pm	2012-04-28 15:19:45 UTC (rev 21857)
+++ trunk/cgi-bin/Apache/LiveJournal.pm	2012-05-02 08:56:16 UTC (rev 21858)
@@ -2250,8 +2250,8 @@
 
     # simplified code from 'package BML::Cookie' in Apache/BML.pm
     my $cookie_str = LJ::Request->header_in("Cookie");
-    if ($cookie_str =~ /\blangpref=(\w{2,10})\/\d+\b/) { # simplified code from BML::decide_language
-        my $lang = $1;
+    if ($cookie_str =~ m{\blangpref=(?:(\w{2,10})/\d+\b|"(\w{2,10})/\d+")}) { # simplified code from BML::decide_language
+        my $lang = $1 || $2;
         # Attention! LJ::Lang::ml uses BML::ml in web context, so we must do full BML language initialization
         BML::set_language($lang, \&LJ::Lang::get_text);
     }

Tags: livejournal, nikulochkina, nnikulochkina, pm
Subscribe

  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 0 comments