vadvs (vadvs) wrote in changelog,
vadvs
vadvs
changelog

[livejournal] r17453: Use LJ::Request module instead of BML to...

Committer: vsukhanov
Use LJ::Request module instead of BML to get remote IP and request header.
U   trunk/cgi-bin/LJ/Talk/Post.pm
Modified: trunk/cgi-bin/LJ/Talk/Post.pm
===================================================================
--- trunk/cgi-bin/LJ/Talk/Post.pm	2010-09-27 09:48:21 UTC (rev 17452)
+++ trunk/cgi-bin/LJ/Talk/Post.pm	2010-09-27 09:56:22 UTC (rev 17453)
@@ -141,8 +141,8 @@
         ($opt_logcommentips eq "S" && $comment->{usertype} !~ /^(?:user|cookieuser)$/))
     {
         if (LJ::is_web_context()) {
-            my $ip = BML::get_remote_ip();
-            my $forwarded = BML::get_client_header('X-Forwarded-For');
+            my $ip = LJ::Request->remote_ip;
+            my $forwarded = LJ::Request->header_in('X-Forwarded-For');
             $ip = "$forwarded, via $ip" if $forwarded && $forwarded ne $ip;
             $talkprop{'poster_ip'} = $ip;
         }

Tags: livejournal, pm, vadvs
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