X-Git-Url: http://koha-dev.rot13.org:8081/gitweb/?a=blobdiff_plain;f=C4%2FInput.pm;h=38042421da1a224feb0c9721058d1cbb5085a8d1;hb=5d6c092921919526ade501facb1220f8a108a08f;hp=2e84dc2a3e51e2091118eb40d764008a78239e3e;hpb=bb4ab3ee765e5664f2d1645efd4b5e5e973a9d56;p=koha_fer diff --git a/C4/Input.pm b/C4/Input.pm index 2e84dc2a3e..38042421da 100644 --- a/C4/Input.pm +++ b/C4/Input.pm @@ -52,7 +52,6 @@ number or ISBN is valid. @ISA = qw(Exporter); @EXPORT = qw( &checkdigit - &buildCGIsort ); =item checkdigit @@ -109,43 +108,6 @@ sub checkdigit ($;$) { return 0; } # sub checkdigit -=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 { - my ($name,$input_name,$data) = @_; - my $dbh=C4::Context->dbh; - my $query=qq{SELECT * FROM authorised_values WHERE category=? order by lib}; - my $sth=$dbh->prepare($query); - $sth->execute($name); - my $CGISort; - if ($sth->rows>0){ - my @values; - my %labels; - - 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( - -name => $input_name, - -id => $input_name, - -values => \@values, - -labels => \%labels, - -default=> $data, - -size => 1, - -multiple => 0); - } - $sth->finish; - return $CGISort; -} END { } # module clean-up code here (global destructor) 1;