X-Git-Url: http://git.rot13.org/?a=blobdiff_plain;f=opac%2Filsdi.pl;h=8320495d5d63a4b2f8dd40d1baf02e072ce08142;hb=6ca6fb45b6122d8d31a8e9d5e3168127373bb1f6;hp=efd759b50389d8322e507a80b7b2738a3efe2b27;hpb=e20270fec4f6d34f01050bea4c5765d5b3c4ed33;p=koha.git diff --git a/opac/ilsdi.pl b/opac/ilsdi.pl index efd759b503..8320495d5d 100755 --- a/opac/ilsdi.pl +++ b/opac/ilsdi.pl @@ -4,28 +4,27 @@ # # This file is part of Koha. # -# Koha is free software; you can redistribute it and/or modify it under the -# terms of the GNU General Public License as published by the Free Software -# Foundation; either version 2 of the License, or (at your option) any later -# version. +# Koha is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. # -# Koha is distributed in the hope that it will be useful, but WITHOUT ANY -# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR -# A PARTICULAR PURPOSE. See the GNU General Public License for more details. +# Koha is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. # -# You should have received a copy of the GNU General Public License along -# with Koha; if not, write to the Free Software Foundation, Inc., -# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +# You should have received a copy of the GNU General Public License +# along with Koha; if not, see . -use strict; -use warnings; - -use List::MoreUtils qw(any); +use Modern::Perl; use C4::ILSDI::Services; use C4::Auth; use C4::Output; use C4::Context; + +use List::MoreUtils qw(any); use XML::Simple; use CGI qw ( -utf8 ); @@ -105,7 +104,7 @@ my %optional = ( 'GetAuthorityRecords' => ['schema'], 'LookupPatron' => ['id_type'], 'AuthenticatePatron' => [], - 'GetPatronInfo' => [ 'show_contact', 'show_fines', 'show_holds', 'show_loans' ], + 'GetPatronInfo' => [ 'show_contact', 'show_fines', 'show_holds', 'show_loans', 'show_attributes' ], 'GetPatronStatus' => [], 'GetServices' => [], 'RenewLoan' => ['desired_due_date'], @@ -129,7 +128,7 @@ unless ( $cgi->param('service') ) { } # If user requested a service description, then display it -if ( $cgi->param('service') eq "Describe" and any { $cgi->param('verb') eq $_ } @services ) { +if ( scalar $cgi->param('service') eq "Describe" and any { scalar $cgi->param('verb') eq $_ } @services ) { my ( $template, $loggedinuser, $cookie ) = get_template_and_user( { template_name => "ilsdi.tt", query => $cgi, @@ -138,7 +137,7 @@ if ( $cgi->param('service') eq "Describe" and any { $cgi->param('verb') eq $_ } debug => 1, } ); - $template->param( $cgi->param('verb') => 1 ); + $template->param( scalar $cgi->param('verb') => 1 ); output_html_with_http_headers $cgi, $cookie, $template->output; exit 0; } @@ -172,7 +171,7 @@ if ( $service and any { $service eq $_ } @services ) { my @parmsrequired = @{ $required{$service} }; my @parmsoptional = @{ $optional{$service} }; my @parmsall = ( @parmsrequired, @parmsoptional ); - my @names = $cgi->param; + my @names = $cgi->multi_param; my %paramhash; $paramhash{$_} = 1 for @names; @@ -200,7 +199,7 @@ if ( $service and any { $service eq $_ } @services ) { # check for multiple parameters for ( @names ) { - my @values = $cgi->param($_); + my @values = $cgi->multi_param($_); if ( $#values != 0 ) { $out->{'code'} = "MultipleValuesNotAllowed"; $out->{'message'} = "Multiple values not allowed for the parameter ".$_."."; @@ -217,7 +216,7 @@ if ( $service and any { $service eq $_ } @services ) { # Variable functions my $sub = do { - no strict 'refs'; +# no strict 'refs'; my $symbol = 'C4::ILSDI::Services::' . $service; \&{"$symbol"}; };