fu: Close-up of Fu, bringing a scoop of water to her mouth (Default)
fu ([personal profile] fu) wrote in [site community profile] changelog2010-06-21 01:53 pm

[dw-free] Using quick reply from a thread in custom comments pages does not return you to thread vie

[commit: http://hg.dwscoalition.org/dw-free/rev/ca607f1f3084]

http://bugs.dwscoalition.org/show_bug.cgi?id=2730

$page->{viewing_thread} is a boolean, used within s2 layers to determine
whether you were viewing a thread or not; we need to pass the actual id of
the thread we're viewing.

Patch by [personal profile] fu.

Files modified:
  • cgi-bin/LJ/S2.pm
  • cgi-bin/LJ/S2/EntryPage.pm
--------------------------------------------------------------------------------
diff -r 431678cf7880 -r ca607f1f3084 cgi-bin/LJ/S2.pm
--- a/cgi-bin/LJ/S2.pm	Mon Jun 21 19:14:41 2010 +0800
+++ b/cgi-bin/LJ/S2.pm	Mon Jun 21 21:59:26 2010 +0800
@@ -3360,7 +3360,7 @@ sub _print_reply_container
         my $ditemid = $page->{'entry'}{'itemid'} || 0;
 
         my $userpic = LJ::ehtml($page->{'_picture_keyword'}) || "";
-        my $thread = $page->{'viewing_thread'} + 0 || "";
+        my $thread = $page->{_viewing_thread_id} + 0 || "";
         $S2::pout->( LJ::create_qr_div( $u, $ditemid, $page->{_styleopts}, $userpic, $thread ) );
     }
 }
diff -r 431678cf7880 -r ca607f1f3084 cgi-bin/LJ/S2/EntryPage.pm
--- a/cgi-bin/LJ/S2/EntryPage.pm	Mon Jun 21 19:14:41 2010 +0800
+++ b/cgi-bin/LJ/S2/EntryPage.pm	Mon Jun 21 21:59:26 2010 +0800
@@ -407,6 +407,7 @@ sub EntryPage
     $p->{'_picture_keyword'} = $get->{'prop_picture_keyword'};
 
     $p->{'viewing_thread'} = $get->{'thread'} ? 1 : 0;
+    $p->{_viewing_thread_id} = $get->{thread} + 0;
 
     # default values if there were no comments, because
     # LJ::Talk::load_comments() doesn't provide them.
--------------------------------------------------------------------------------

Post a comment in response:

This account has disabled anonymous posting.
If you don't have an account you can create one now.
HTML doesn't work in the subject.
More info about formatting

If you are unable to use this captcha for any reason, please contact us by email at support@dreamwidth.org