Don't show duplicate entries when the sticky entry is still on the page.
Patch by afuna.
diffs (19 lines):
diff -r 6f2475049809 -r 17f387d8f318 cgi-bin/LJ/S2/RecentPage.pm
--- a/cgi-bin/LJ/S2/RecentPage.pm Wed Jan 06 00:33:22 2010 +0000
+++ b/cgi-bin/LJ/S2/RecentPage.pm Wed Jan 06 01:13:10 2010 +0000
@@ -152,10 +152,13 @@ sub RecentPage
my ($posterid, $itemid, $anum) =
map { $item->{$_} } qw(posterid itemid anum);
+ # need to increment before possibly doing a next, so that the
skiplinks will work
+ $itemnum++;
+
my $ditemid = $itemid * 256 + $anum;
+ next if $itemnum > 0 && $stickyentry && $stickyentry->ditemid ==
$ditemid;
+
my $entry_obj = LJ::Entry->new( $u, ditemid => $ditemid );
-
- $itemnum++;
# don't show posts from suspended users or suspended posts unless the
user doing the viewing says to (and is allowed)
next ENTRY if $apu{$posterid} && $apu{$posterid}->is_suspended &&
!$viewsome;
_______________________________________________
dw-changelog mailing list
[email protected]
http://lists.dwscoalition.org/mailman/listinfo/dw-changelog