Cool Archive is giving a server error when you do an
order by on title or reputation without supplying a username.
Current code:
44: my $user = $query->param("cooluser");
45: if ($user) {
46: my $U = getNode($user, 'user');
47: return $str . "<br>Sorry, no '$user' is found on the system!" unless $U;
48:
49: if ($useraction eq "cooled") {
50: $wherestr .= " and cooledby_user=".getId($U);
51: } elsif ($useraction eq 'written') {
52: $wherestr .= " and author_user=".getId($U);
53: }
54: }
If we put in another if clause to check for this condition, then it should be fixed:
54: } elsif ( $orderby =~ /title|reputation/ ) {
55: return $str . "<br>A username must be supplied if ordering by title or reputation!";
56: }
I've not tested this code, but I think it should do the job
N-Wing says: done; Cool Archive; I made the regex a bit more specific, though, I'm picky like that :)