2heoh (2heoh) wrote in changelog,
2heoh
2heoh
changelog

[livejournal] r19420: LJM-1842: No replacement for video

Committer: slobin
LJM-1842: No replacement for video

M LiveJournal.pm
U   trunk/cgi-bin/Apache/LiveJournal.pm
Modified: trunk/cgi-bin/Apache/LiveJournal.pm
===================================================================
--- trunk/cgi-bin/Apache/LiveJournal.pm	2011-07-04 03:26:01 UTC (rev 19419)
+++ trunk/cgi-bin/Apache/LiveJournal.pm	2011-07-04 03:38:29 UTC (rev 19420)
@@ -351,6 +351,14 @@
     # process controller
     # if defined
     if( LJ::Request->notes('controller') ) {
+
+        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;
+            # 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);
+        }
+
         my @args = split (/\//, LJ::Request->uri);
         
         my $response = LJ::Request->notes('controller')->process([@args[1 .. @args-1]]);

Tags: 2heoh, livejournal, 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