If no sort order is specified, use the cookie if available.

git-svn-id: svn://10.0.0.236/trunk@58406 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
terry%mozilla.org
2000-01-22 19:23:58 +00:00
parent 2cfbd32811
commit 556880c3d1

View File

@@ -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.