Oops; fixed perl error.

git-svn-id: svn://10.0.0.236/trunk@51060 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
terry%mozilla.org
1999-10-18 23:32:03 +00:00
parent 6856a7ee21
commit 94c58cd2a0

View File

@@ -102,12 +102,14 @@ my @fields = split(/,/, $::FORM{'sort'});
sub Compare {
my $rval = 0;
my $key;
my $aref = eval("\\\%$a");
my $bref = eval("\\\%$b");
foreach $key (@fields) {
if ($key eq 'date') {
$rval = $$b{$key} cmp $$a{$key};
$rval = $$bref{$key} cmp $$aref{$key};
} else {
$rval = $$a{$key} cmp $$b{$key};
$rval = $$aref{$key} cmp $$bref{$key};
}
return $rval unless ($rval == 0);
}