&buildCGIsort
);
-# FIXME - This is never used.
-#sub checkflds {
-# my ($env,$reqflds,$data) = @_;
-# my $numrflds = @$reqflds;
-# my @probarr;
-# my $i = 0;
-# while ($i < $numrflds) {
-# if ($data->{@$reqflds[$i]} eq "") {
-# push(@probarr, @$reqflds[$i]);
-# }
-# $i++
-# }
-# return (\@probarr);
-#}
-
=item checkdigit
- $valid = &checkdigit($env, $cardnumber $nounique);
+ $valid = &checkdigit($cardnumber $nounique);
Takes a card number, computes its check digit, and compares it to the
checkdigit at the end of C<$cardnumber>. Returns a true value iff
C<$cardnumber> has a valid check digit.
-C<$env> is ignored.
-
=cut
#'
sub checkdigit {
- my ($env,$infl, $nounique) = @_;
+ my ($infl, $nounique) = @_;
$infl = uc $infl;
Returns the scrolling list with name $input_name, built on authorised Values named $name.
Returns NULL if no authorised values found
-=item buildCGISort
-
- $CGIScrollingList = &BuildCGISort($name string, $input_name string);
-
-Returns the scrolling list with name $input_name, built on authorised Values named $name.
-Returns NULL if no authorised values found
-
=cut
sub buildCGIsort {
use strict;
if ($sth->rows>0){
my @values;
my %labels;
- for (my $i =0;$i<=$sth->rows;$i++){
+
+ for (my $i =0;$i<$sth->rows;$i++){
my $results = $sth->fetchrow_hashref;
push @values, $results->{authorised_value};
$labels{$results->{authorised_value}}=$results->{lib};
}
- $CGISort= CGI::scrolling_list(
+ unshift(@values,"");
+ $CGISort= CGI::scrolling_list(
-name => $input_name,
-values => \@values,
-labels => \%labels,