diff options
author | ivan <ivan> | 2003-09-06 07:20:59 +0000 |
---|---|---|
committer | ivan <ivan> | 2003-09-06 07:20:59 +0000 |
commit | b487a58e0f36136dbd714916f98a4eaed2373bb0 (patch) | |
tree | abe50270b4b72222222c944ebc8fd8bff1c23b57 /httemplate | |
parent | d36be121c808c07d9d4924d94294029c0c840088 (diff) |
hide display of disabled packages from agent type browse
Diffstat (limited to 'httemplate')
-rwxr-xr-x | httemplate/browse/agent_type.cgi | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/httemplate/browse/agent_type.cgi b/httemplate/browse/agent_type.cgi index 5a8438589..c61208c83 100755 --- a/httemplate/browse/agent_type.cgi +++ b/httemplate/browse/agent_type.cgi @@ -17,9 +17,11 @@ agents.<BR><BR> foreach my $agent_type ( sort { $a->getfield('typenum') <=> $b->getfield('typenum') } qsearch('agent_type',{}) ) { - my($hashref)=$agent_type->hashref; - my(@type_pkgs)=qsearch('type_pkgs',{'typenum'=> $hashref->{typenum} }); - my($rowspan)=scalar(@type_pkgs); + my $hashref = $agent_type->hashref; + #more efficient to do this with SQL... + my @type_pkgs = grep { ! $_->part_pkg->disabled } + qsearch('type_pkgs',{'typenum'=> $hashref->{typenum} }); + my $rowspan = scalar(@type_pkgs); $rowspan = int($rowspan/2+0.5) ; print <<END; <TR> |