diff options
author | ivan <ivan> | 2003-11-03 05:48:14 +0000 |
---|---|---|
committer | ivan <ivan> | 2003-11-03 05:48:14 +0000 |
commit | de38e11cb5a40c78ef5543f59f6ce968e7fd613b (patch) | |
tree | 0488da36ba33181507c1185ffbd45d996de2532f /httemplate | |
parent | 3a167673061380c0d98d5d5d5af040b31a9c6252 (diff) |
add suspended/canceled package browse
Diffstat (limited to 'httemplate')
-rwxr-xr-x | httemplate/search/cust_pkg.cgi | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/httemplate/search/cust_pkg.cgi b/httemplate/search/cust_pkg.cgi index f735fbf42..1d54a53f6 100755 --- a/httemplate/search/cust_pkg.cgi +++ b/httemplate/search/cust_pkg.cgi @@ -48,10 +48,21 @@ if ( $cgi->param('magic') && $cgi->param('magic') eq 'bill' ) { } else { my $qual = ''; - if ( $cgi->param('magic') && $cgi->param('magic') eq 'active' ) { + if ( $cgi->param('magic') && + $cgi->param('magic') =~ /^(active|suspended|canceled)$/ + ) { - $qual = 'WHERE ( susp IS NULL OR susp = 0 )'. - ' AND ( cancel IS NULL OR cancel = 0)'; + if ( $cgi->param('magic') eq 'active' ) { + $qual = 'WHERE ( susp IS NULL OR susp = 0 )'. + ' AND ( cancel IS NULL OR cancel = 0)'; + } elsif ( $cgi->param('magic') eq 'suspended' ) { + $qual = 'WHERE susp IS NOT NULL AND susp > 0'. + ' AND ( cancel IS NULL OR cancel = 0)'; + } elsif ( $cgi->param('magic') eq 'canceled' ) { + $qual = 'WHERE cancel IS NOT NULL AND cancel > 0'; + } else { + die "guru meditation #420"; + } $sortby = \*pkgnum_sort; |