Committer: nnikulochkina
LJSUP-13578: XML RPC paid repost are not accessibleU trunk/cgi-bin/ljprotocol.pl
Modified: trunk/cgi-bin/ljprotocol.pl =================================================================== --- trunk/cgi-bin/ljprotocol.pl 2012-09-12 07:22:54 UTC (rev 22870) +++ trunk/cgi-bin/ljprotocol.pl 2012-09-12 07:49:43 UTC (rev 22871) @@ -268,18 +268,15 @@ $req->{'ver'} = 0 unless defined $req->{'ver'}; # check specified language - if (defined $req->{'lang'} && $req->{'lang'}) { - if ($req->{'lang'} eq 'en') { - $req->{'lang'} = "en_LJ"; - } elsif (not grep /^$req->{'lang'}$/, @LJ::LANGS) { - return fail($err, 221, $req->{'lang'} ); - } + if ($req->{'lang'} && not grep /^$req->{'lang'}$/, @LJ::LANGS) { + return fail($err, 221, $req->{'lang'} ); } } # set specified or default language my $current_lang = LJ::Lang::current_language(); my $lang = $req->{'lang'} || $current_lang || $LJ::DEFAULT_LANG; + $lang = 'en_LJ' if $lang eq 'en'; LJ::Lang::current_language($lang) unless $lang eq $current_lang; $flags ||= {}; @@ -329,6 +326,7 @@ } LJ::Request->notes("codepath" => "") if LJ::Request->is_inited; + return fail($err, 201); }