mark: A photo of Mark kneeling on top of the Taal Volcano in the Philippines. It was a long hike. (Default)
Mark Smith ([staff profile] mark) wrote in [site community profile] changelog2009-12-07 05:33 am

[dw-free] filter=0 is not added to skip links

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

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

Preserve filter=XYZ on skip links on the reading page.

Patch by [personal profile] yvi.

Files modified:
  • cgi-bin/LJ/S2/FriendsPage.pm
--------------------------------------------------------------------------------
diff -r f83ad558778f -r 68edb73b6522 cgi-bin/LJ/S2/FriendsPage.pm
--- a/cgi-bin/LJ/S2/FriendsPage.pm	Mon Dec 07 05:10:29 2009 +0000
+++ b/cgi-bin/LJ/S2/FriendsPage.pm	Mon Dec 07 05:33:50 2009 +0000
@@ -228,11 +228,12 @@ sub FriendsPage
     if ($skip) {
         my %linkvars;
         $linkvars{'show'} = $get->{'show'} if $get->{'show'} =~ /^\w+$/;
+        $linkvars{'date'} = $get->{date} if $get->{date};
+        $linkvars{filter} = $get->{filter}+0 if defined $get->{filter};
+        $nav->{'forward_url'} = LJ::make_link($base, \%linkvars);
         my $newskip = $skip - $itemshow;
         if ($newskip > 0) { $linkvars{'skip'} = $newskip; }
         else { $newskip = 0; }
-        $linkvars{'date'} = $get->{date} if $get->{date};
-        $nav->{'forward_url'} = LJ::make_link($base, \%linkvars);
         $nav->{'forward_skip'} = $newskip;
         $nav->{'forward_count'} = $itemshow;
         $p->{head_content} .= qq#<link rel="next" href="$nav->{forward_url}" />\n#;
@@ -246,6 +247,7 @@ sub FriendsPage
         my %linkvars;
         $linkvars{'show'} = $get->{'show'} if $get->{'show'} =~ /^\w+$/;
         $linkvars{'date'} = $get->{'date'} if $get->{'date'};
+        $linkvars{filter} = $get->{filter}+0 if defined $get->{filter};
         my $newskip = $skip + $itemshow;
         $linkvars{'skip'} = $newskip;
         $nav->{'backward_url'} = LJ::make_link($base, \%linkvars);
--------------------------------------------------------------------------------

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