From b487a58e0f36136dbd714916f98a4eaed2373bb0 Mon Sep 17 00:00:00 2001 From: ivan Date: Sat, 6 Sep 2003 07:20:59 +0000 Subject: [PATCH] hide display of disabled packages from agent type browse --- httemplate/browse/agent_type.cgi | 8 +++++--- 1 file 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.

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 < -- 2.11.0