vadvs (vadvs) wrote in changelog,
vadvs
vadvs
changelog

[livejournal] r17591: LJSUP-7097: Change logic for commenting ...

Committer: vsukhanov
LJSUP-7097: Change logic for commenting from the different username.
U   trunk/cgi-bin/LJ/Talk/Author/User.pm
U   trunk/cgi-bin/LJ/Talk/Post.pm
Modified: trunk/cgi-bin/LJ/Talk/Author/User.pm
===================================================================
--- trunk/cgi-bin/LJ/Talk/Author/User.pm	2010-10-22 06:37:10 UTC (rev 17590)
+++ trunk/cgi-bin/LJ/Talk/Author/User.pm	2010-10-22 08:09:17 UTC (rev 17591)
@@ -158,8 +158,8 @@
         }
     }
 
-    # unless the user came from the email form, log them in
-    if ( !$init->{'used_ecp'} && ! @$errret ) {
+    # unless the user came from the email form or alredy logged, log them in
+    if (!$form->{donot_login} && !$init->{'used_ecp'} && ! @$errret ) {
         $up->make_login_session($exptype, $ipfixed);
     } else {
         # record their login session anyway

Modified: trunk/cgi-bin/LJ/Talk/Post.pm
===================================================================
--- trunk/cgi-bin/LJ/Talk/Post.pm	2010-10-22 06:37:10 UTC (rev 17590)
+++ trunk/cgi-bin/LJ/Talk/Post.pm	2010-10-22 08:09:17 UTC (rev 17591)
@@ -299,6 +299,10 @@
     }
     ### hacks end here
 
+    ### Logged user may post comment from other one,
+    ### in this case we should not loggin them again.
+    $form->{donot_login} = 1 if LJ::get_remote();
+
     my $up;
 
     my $author_class = LJ::Talk::Author->get_handler($form->{'usertype'});

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