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

[livejournal] r21861: 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-05-02 09:34:34 UTC (rev 21860)
+++ trunk/cgi-bin/Apache/LiveJournal.pm	2012-05-02 09:36:53 UTC (rev 21861)
@@ -2250,8 +2250,9 @@
 
     # simplified code from 'package BML::Cookie' in Apache/BML.pm
     my $cookie_str = LJ::Request->header_in("Cookie");
-    warn("Apache::LiveJournal: \$cookie_str = [$cookie_str]");
-    if ($cookie_str =~ m{\blangpref=(?:(\w{2,10})/\d+\b|"(\w{2,10})/\d+")}) { # simplified code from BML::decide_language
+    
+    # simplified code from BML::decide_language
+    if ($cookie_str && LJ::durl($cookie_str) =~ m{\blangpref=(?:(\w{2,10})/\d+\b|"(\w{2,10})/\d+")}) { 
         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