default to a session cookie instead of setting an explicit timeout, weird timezone...
[freeside.git] / httemplate / search / elements / match-classnum
1 <%args>
2 $param            # name of the form field containing the classnum
3 $field => $param  # SQL field that must match that form field
4 </%args>
5 <%init>
6 my @values = grep /^(\d+)$/, $cgi->param( $param );
7 if (@values) {
8   return "COALESCE($field, 0) IN (" . join(',', @values) . ')';
9 } else {
10   return;
11 }
12 </%init>