Committer: iaskarov
LJSUP-7801 fix 2nd page of the entryU trunk/cgi-bin/LJ/Entry.pm U trunk/cgi-bin/LJ/S2/EntryPage.pm U trunk/htdocs/talkread.bml
Modified: trunk/cgi-bin/LJ/Entry.pm =================================================================== --- trunk/cgi-bin/LJ/Entry.pm 2011-02-02 11:01:22 UTC (rev 18186) +++ trunk/cgi-bin/LJ/Entry.pm 2011-02-02 11:13:57 UTC (rev 18187) @@ -814,9 +814,12 @@ $opts->{suspend_msg} = $suspend_msg; $opts->{unsuspend_supportid} = $suspend_msg ? $self->prop("unsuspend_supportid") : 0; - unless ($opts->{cuturl}){ + if($opts->{no_cut_expand}) { + $opts->{expand_cut} = 0; + $opts->{cuturl} = $self->url . '?page=' . $opts->{page} . '&cut_expand=1'; + } elsif (!$opts->{cuturl}) { + $opts->{expand_cut} = 1; $opts->{cuturl} = $self->url; - $opts->{expand_cut} = 1; } $self->_load_text unless $self->{_loaded_text}; Modified: trunk/cgi-bin/LJ/S2/EntryPage.pm =================================================================== --- trunk/cgi-bin/LJ/S2/EntryPage.pm 2011-02-02 11:01:22 UTC (rev 18186) +++ trunk/cgi-bin/LJ/S2/EntryPage.pm 2011-02-02 11:13:57 UTC (rev 18187) @@ -483,7 +483,14 @@ } my $subject = $entry->subject_html; - my $event = $entry->event_html; + + my $no_cut_expand = !$get->{cut_expand} && $get->{page} && $get->{page} > 1 ? 1 : 0; + + my $event = $entry->event_html({ + no_cut_expand => $no_cut_expand, + page => $get->{page}, + }); + if ($get->{'nohtml'}) { # quote all non-LJ tags $subject =~ s{<(?!/?lj)(.*?)>} {<$1>}gi; Modified: trunk/htdocs/talkread.bml =================================================================== --- trunk/htdocs/talkread.bml 2011-02-02 11:01:22 UTC (rev 18186) +++ trunk/htdocs/talkread.bml 2011-02-02 11:13:57 UTC (rev 18187) @@ -232,6 +232,12 @@ my $event = $item->{'event'}; my $suspend_msg = $entry && $entry->should_show_suspend_msg_to($remote) ? 1 : 0; + my $no_cut_expand = !$GET{cut_expand} && $GET{page} && $GET{page} > 1 ? 1 : 0; + + if($no_cut_expand) { + $talkurl .= '?page=' . $GET{page} . '&cut_expand=1'; + } + LJ::CleanHTML::clean_event( \$event, { @@ -239,7 +245,7 @@ suspend_msg => $suspend_msg, unsuspend_supportid => $suspend_msg ? $entry->prop("unsuspend_supportid") : 0, cuturl => $talkurl, - expand_cut => 1, + expand_cut => !$no_cut_expand, } ); LJ::expand_embedded($u, $ditemid, $remote, \$event);