From 7ebc0d0c495604c8086bc602198ac02972bbe8a5 Mon Sep 17 00:00:00 2001 From: ivan Date: Mon, 26 Oct 2009 23:17:56 +0000 Subject: [PATCH] better fix for ignoring disabled package classes that doesn't search them twice --- httemplate/elements/tr-select-pkg_class.html | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/httemplate/elements/tr-select-pkg_class.html b/httemplate/elements/tr-select-pkg_class.html index ece4b58c0..2dc9ae7be 100644 --- a/httemplate/elements/tr-select-pkg_class.html +++ b/httemplate/elements/tr-select-pkg_class.html @@ -1,6 +1,6 @@ -% if ( $count == 0 ) { +% if ( scalar(@{ $opt{'pkg_class'} }) == 0 ) { - + % } else { @@ -22,6 +22,6 @@ my %opt = @_; my $classnum = $opt{'curr_value'} || $opt{'value'}; -my $count = scalar( qsearch( 'pkg_class', {} ) ); +$opt{'pkg_class'} ||= [ qsearch( 'pkg_class', { disabled=>'' } ) ]; -- 2.11.0