#94 search for "any" only returns "open"

open
nobody
None
5
2009-02-13
2009-02-13
J.D. Laub
No

1.9.2 had this at lib/Codestriker/Action/ListTopics.pm:258

# Only show open topics if codestriker.pl was run without parameters.
if (defined($http_input->{query}->param) == 0 || !defined($sstate)) {
$sstate = 0;
}

but 1.9.8 has this instead:

# Default to show open topics if sstate is not defined.
if (!defined($sstate) || $sstate eq "") {
$sstate = 0;
}

That causes a problem because a search for a state of "Any" ends up not sending anything for the state, which the new code above then turns into "Open" (whereas the old code leaves it as null). The attached is fugly; even though it seems to work, there's gotta be a better way.

Discussion

  • J.D. Laub
    J.D. Laub
    2009-02-13

    hack to fix broken "any" search

     
    Attachments