From: terry%mozilla.org <> Date: Sun, 23 Jan 2000 03:23:58 +0000 (+0000) Subject: If no sort order is specified, use the cookie if available. X-Git-Tag: bugzilla-2.12~439 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b8a79ce28e8155051127872a2370835015cf4dc1;p=thirdparty%2Fbugzilla.git If no sort order is specified, use the cookie if available. --- diff --git a/buglist.cgi b/buglist.cgi index 488944fb43..2fab69650d 100755 --- a/buglist.cgi +++ b/buglist.cgi @@ -550,10 +550,14 @@ foreach my $f ("short_desc", "long_desc", "bug_file_loc", $query .= "group by bugs.bug_id\n"; -if (defined $::FORM{'order'} && $::FORM{'order'} ne "") { - if ($::COOKIE{'LASTORDER'} && $::FORM{'order'} =~ /^reuse/i) { +if ($::COOKIE{'LASTORDER'}) { + if ((!$::FORM{'order'}) || $::FORM{'order'} =~ /^reuse/i) { $::FORM{'order'} = url_decode($::COOKIE{'LASTORDER'}); } +} + + +if (defined $::FORM{'order'} && $::FORM{'order'} ne "") { $query .= "order by "; $::FORM{'order'} =~ s/votesum/bugs.votes/; # Silly backwards compatability # hack.