diff options
author | ivan <ivan> | 2009-10-26 23:17:57 +0000 |
---|---|---|
committer | ivan <ivan> | 2009-10-26 23:17:57 +0000 |
commit | 1fb1d4f8e0345665cb00747ddf4176b77c81896d (patch) | |
tree | 64c329248856e3982dbb1abe75d0f19c714f86eb | |
parent | 8b0eb311c3adf9fd74a0efb2eca5ba791b4d5073 (diff) |
better fix for ignoring disabled package classes that doesn't search them twice
-rw-r--r-- | httemplate/elements/tr-select-pkg_class.html | 6 |
1 files 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 ) { - <INPUT TYPE="hidden" NAME="<% $opt{'element_name'} || $opt{'field'} || 'classnum' %>" VALUE=""> + <INPUT TYPE="hidden" NAME="<% $opt{'field'} || 'classnum' %>" VALUE=""> % } 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=>'' } ) ]; </%init> |