Bug 25898: Prohibit indirect object notation

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This commit is contained in:
Julian Maurice 2020-06-29 21:07:54 +04:00 committed by Jonathan Druart
parent 3e2b6b9299
commit 96cc447045
509 changed files with 590 additions and 590 deletions

View File

@ -1,5 +1,5 @@
severity = 5 severity = 5
include = ProhibitUnusedVariables include = ProhibitUnusedVariables Objects::ProhibitIndirectSyntax
exclude = Miscellanea::RequireRcsKeywords exclude = Miscellanea::RequireRcsKeywords
[Perl::Critic::Policy::BuiltinFunctions::ProhibitStringyEval] [Perl::Critic::Policy::BuiltinFunctions::ProhibitStringyEval]

View File

@ -1804,7 +1804,7 @@ sub _get_session_params {
sub get_session { sub get_session {
my $sessionID = shift; my $sessionID = shift;
my $params = _get_session_params(); my $params = _get_session_params();
return new CGI::Session( $params->{dsn}, $sessionID, $params->{dsn_args} ); return CGI::Session->new( $params->{dsn}, $sessionID, $params->{dsn_args} );
} }

View File

@ -227,7 +227,7 @@ sub SearchAuthorities {
my @oAuth; my @oAuth;
my $i; my $i;
$oAuth[0]=C4::Context->Zconn("authorityserver" , 1); $oAuth[0]=C4::Context->Zconn("authorityserver" , 1);
my $Anewq= new ZOOM::Query::PQF($query,$oAuth[0]); my $Anewq= ZOOM::Query::PQF->new($query,$oAuth[0]);
my $oAResult; my $oAResult;
$oAResult= $oAuth[0]->search($Anewq) ; $oAResult= $oAuth[0]->search($Anewq) ;
while (($i = ZOOM::event(\@oAuth)) != 0) { while (($i = ZOOM::event(\@oAuth)) != 0) {

View File

@ -159,7 +159,7 @@ sub Z3950Search {
$oResult[$s] = $oResult[$s] =
$server->{servertype} eq 'zed'? $server->{servertype} eq 'zed'?
$oConnection[$s]->search_pqf( $server_zquery ): $oConnection[$s]->search_pqf( $server_zquery ):
$oConnection[$s]->search(new ZOOM::Query::CQL( $oConnection[$s]->search(ZOOM::Query::CQL->new(
_translate_query( $server, $squery ))); _translate_query( $server, $squery )));
$s++; $s++;
} }
@ -430,7 +430,7 @@ sub _isbn_replace {
sub _create_connection { sub _create_connection {
my ( $server ) = @_; my ( $server ) = @_;
my $option1= new ZOOM::Options(); my $option1= ZOOM::Options->new();
$option1->option( 'async' => 1 ); $option1->option( 'async' => 1 );
$option1->option( 'elementSetName', 'F' ); $option1->option( 'elementSetName', 'F' );
$option1->option( 'preferredRecordSyntax', $server->{syntax} ); $option1->option( 'preferredRecordSyntax', $server->{syntax} );
@ -568,7 +568,7 @@ sub Z3950SearchAuth {
} }
else { else {
$oResult[$s] = $oConnection[$s]->search( $oResult[$s] = $oConnection[$s]->search(
new ZOOM::Query::CQL(_translate_query( $server, $squery )) ZOOM::Query::CQL->new(_translate_query( $server, $squery ))
); );
} }
$encoding[$s] = ($server->{encoding}?$server->{encoding}:"iso-5426"); $encoding[$s] = ($server->{encoding}?$server->{encoding}:"iso-5426");

View File

@ -637,7 +637,7 @@ sub _new_Zconn {
my $password = $context->{"serverinfo"}->{$server}->{"password"}; my $password = $context->{"serverinfo"}->{$server}->{"password"};
eval { eval {
# set options # set options
my $o = new ZOOM::Options(); my $o = ZOOM::Options->new();
$o->option(user => $user) if $user && $password; $o->option(user => $user) if $user && $password;
$o->option(password => $password) if $user && $password; $o->option(password => $password) if $user && $password;
$o->option(async => 1) if $async; $o->option(async => 1) if $async;

View File

@ -243,7 +243,7 @@ sub checkauth {
if ( $sessionID = $query->cookie("CGISESSID") ) { if ( $sessionID = $query->cookie("CGISESSID") ) {
C4::Context->_new_userenv($sessionID); C4::Context->_new_userenv($sessionID);
my $session = my $session =
new CGI::Session( "driver:File;serializer:yaml", $sessionID, CGI::Session->new( "driver:File;serializer:yaml", $sessionID,
{ Directory => $sessdir } ); { Directory => $sessdir } );
if ( $session->param('cardnumber') ) { if ( $session->param('cardnumber') ) {
C4::Context->set_userenv( C4::Context->set_userenv(
@ -283,7 +283,7 @@ sub checkauth {
} }
unless ($userid) { unless ($userid) {
my $session = my $session =
new CGI::Session( "driver:File;serializer:yaml", undef, { Directory => $sessdir } ); CGI::Session->new( "driver:File;serializer:yaml", undef, { Directory => $sessdir } );
$sessionID = $session->id; $sessionID = $session->id;
$userid = $query->param('userid'); $userid = $query->param('userid');
C4::Context->_new_userenv($sessionID); C4::Context->_new_userenv($sessionID);

View File

@ -603,7 +603,7 @@ sub getlanguage {
return $cached if $cached; return $cached if $cached;
} }
$cgi //= new CGI; $cgi //= CGI->new;
my $interface = C4::Context->interface; my $interface = C4::Context->interface;
my $theme = C4::Context->preference( ( $interface eq 'opac' ) ? 'opacthemes' : 'template' ); my $theme = C4::Context->preference( ( $interface eq 'opac' ) ? 'opacthemes' : 'template' );
my $language; my $language;

View File

@ -375,7 +375,7 @@ sub marc2endnote {
Year => $marc_rec_obj->publication_date, Year => $marc_rec_obj->publication_date,
Abstract => $abstract, Abstract => $abstract,
}; };
my $style = new Biblio::EndnoteStyle(); my $style = Biblio::EndnoteStyle->new();
my $template; my $template;
$template.= "DB - DB\n" if C4::Context->preference("LibraryName"); $template.= "DB - DB\n" if C4::Context->preference("LibraryName");
$template.="T1 - Title\n" if $marc_rec_obj->title(); $template.="T1 - Title\n" if $marc_rec_obj->title();

View File

@ -12,7 +12,7 @@ use XML::Simple qw(:strict);
use C4::SIP::Sip qw(siplog); use C4::SIP::Sip qw(siplog);
my $parser = new XML::Simple( my $parser = XML::Simple->new(
KeyAttr => { KeyAttr => {
login => '+id', login => '+id',
institution => '+id', institution => '+id',

View File

@ -263,7 +263,7 @@ sub run_sip_tests {
$Sip::error_detection = 1; $Sip::error_detection = 1;
$/ = "\015\012"; # must use correct record separator $/ = "\015\012"; # must use correct record separator
$sock = new IO::Socket::INET(PeerAddr => $server, $sock = IO::Socket::INET->new(PeerAddr => $server,
Type => SOCK_STREAM); Type => SOCK_STREAM);
BAIL_OUT('failed to create connection to server') unless $sock; BAIL_OUT('failed to create connection to server') unless $sock;

View File

@ -13,7 +13,7 @@ use English;
use XML::Simple qw(:strict); use XML::Simple qw(:strict);
use Data::Dumper; use Data::Dumper;
my $parser = new XML::Simple( KeyAttr => { login => '+id', my $parser = XML::Simple->new( KeyAttr => { login => '+id',
institution => '+id', institution => '+id',
service => '+port', }, service => '+port', },
GroupTags => { listeners => 'service', GroupTags => { listeners => 'service',

View File

@ -224,7 +224,7 @@ sub SimpleSearch {
eval { eval {
$zconns[$i] = C4::Context->Zconn( $servers[$i], 1 ); $zconns[$i] = C4::Context->Zconn( $servers[$i], 1 );
$query =~ s/:/=/g unless $options{skip_normalize}; $query =~ s/:/=/g unless $options{skip_normalize};
$zoom_queries[$i] = new ZOOM::Query::CCL2RPN( $query, $zconns[$i]); $zoom_queries[$i] = ZOOM::Query::CCL2RPN->new( $query, $zconns[$i]);
$tmpresults[$i] = $zconns[$i]->search( $zoom_queries[$i] ); $tmpresults[$i] = $zconns[$i]->search( $zoom_queries[$i] );
# error handling # error handling
@ -337,18 +337,18 @@ sub getRecords {
if ($query_type) { if ($query_type) {
if ($query_type =~ /^ccl/) { if ($query_type =~ /^ccl/) {
$query_to_use =~ s/\:/\=/g; # change : to = last minute (FIXME) $query_to_use =~ s/\:/\=/g; # change : to = last minute (FIXME)
$results[$i] = $zconns[$i]->search(new ZOOM::Query::CCL2RPN($query_to_use, $zconns[$i])); $results[$i] = $zconns[$i]->search(ZOOM::Query::CCL2RPN->new($query_to_use, $zconns[$i]));
} elsif ($query_type =~ /^cql/) { } elsif ($query_type =~ /^cql/) {
$results[$i] = $zconns[$i]->search(new ZOOM::Query::CQL($query_to_use, $zconns[$i])); $results[$i] = $zconns[$i]->search(ZOOM::Query::CQL->new($query_to_use, $zconns[$i]));
} elsif ($query_type =~ /^pqf/) { } elsif ($query_type =~ /^pqf/) {
$results[$i] = $zconns[$i]->search(new ZOOM::Query::PQF($query_to_use, $zconns[$i])); $results[$i] = $zconns[$i]->search(ZOOM::Query::PQF->new($query_to_use, $zconns[$i]));
} else { } else {
warn "Unknown query_type '$query_type'. Results undetermined."; warn "Unknown query_type '$query_type'. Results undetermined.";
} }
} elsif ($scan) { } elsif ($scan) {
$results[$i] = $zconns[$i]->scan( new ZOOM::Query::CCL2RPN($query_to_use, $zconns[$i])); $results[$i] = $zconns[$i]->scan( ZOOM::Query::CCL2RPN->new($query_to_use, $zconns[$i]));
} else { } else {
$results[$i] = $zconns[$i]->search(new ZOOM::Query::CCL2RPN($query_to_use, $zconns[$i])); $results[$i] = $zconns[$i]->search(ZOOM::Query::CCL2RPN->new($query_to_use, $zconns[$i]));
} }
}; };
if ($@) { if ($@) {

View File

@ -86,7 +86,7 @@ passed to C<return_success()>.
sub init { sub init {
my ( $class, %needed_flags ) = @_; my ( $class, %needed_flags ) = @_;
our $query = new CGI; our $query = CGI->new;
my ( $status, $cookie_, $sessionID ) = check_api_auth( $query, \%needed_flags ); my ( $status, $cookie_, $sessionID ) = check_api_auth( $query, \%needed_flags );
@ -94,7 +94,7 @@ sub init {
$class->return_error( 'auth', $status ) if ( $status ne 'ok' ); $class->return_error( 'auth', $status ) if ( $status ne 'ok' );
return ( $query, new C4::Output::JSONStream ); return ( $query, C4::Output::JSONStream->new );
} }
=head2 return_error =head2 return_error
@ -119,7 +119,7 @@ param => value pairs.
sub return_error { sub return_error {
my ( $class, $type, $error, %flags ) = @_; my ( $class, $type, $error, %flags ) = @_;
my $response = new C4::Output::JSONStream; my $response = C4::Output::JSONStream->new;
$response->param( message => $error ) if ( $error ); $response->param( message => $error ) if ( $error );
$response->param( type => $type, %flags ); $response->param( type => $type, %flags );
@ -152,7 +152,7 @@ structure verbatim.
sub return_multi { sub return_multi {
my ( $class, $responses, @flags ) = @_; my ( $class, $responses, @flags ) = @_;
my $response = new C4::Output::JSONStream; my $response = C4::Output::JSONStream->new;
if ( !@$responses ) { if ( !@$responses ) {
$class->return_success( $response ); $class->return_success( $response );

View File

@ -65,7 +65,7 @@ sub new {
} }
}; };
my $query = new CGI; # To keep C4::Templates::_get_template_file() from complaining my $query = CGI->new; # To keep C4::Templates::_get_template_file() from complaining
my ( $htdocs, $theme, $lang, $base ) = my ( $htdocs, $theme, $lang, $base ) =
C4::Templates::_get_template_file('ill/log/', 'intranet', $query); C4::Templates::_get_template_file('ill/log/', 'intranet', $query);

View File

@ -30,7 +30,7 @@ sub new {
my $self = $class->SUPER::new(%args); my $self = $class->SUPER::new(%args);
$timestamp =~ s/ /T/, $timestamp .= 'Z'; $timestamp =~ s/ /T/, $timestamp .= 'Z';
$self->header( new HTTP::OAI::Header( $self->header( HTTP::OAI::Header->new(
status => 'deleted', status => 'deleted',
identifier => $args{identifier}, identifier => $args{identifier},
datestamp => $timestamp, datestamp => $timestamp,

View File

@ -92,7 +92,7 @@ sub new {
{ {
return HTTP::OAI::Response->new( return HTTP::OAI::Response->new(
requestURL => $repository->self_url(), requestURL => $repository->self_url(),
errors => [ new HTTP::OAI::Error( errors => [ HTTP::OAI::Error->new(
code => 'idDoesNotExist', code => 'idDoesNotExist',
message => "There is no biblio record with this identifier", message => "There is no biblio record with this identifier",
) ], ) ],

View File

@ -39,7 +39,7 @@ use MARC::File::XML;
sub GetRecords { sub GetRecords {
my ($class, $self, $repository, $metadata, %args) = @_; my ($class, $self, $repository, $metadata, %args) = @_;
my $token = new Koha::OAI::Server::ResumptionToken( %args ); my $token = Koha::OAI::Server::ResumptionToken->new( %args );
my $dbh = C4::Context->dbh; my $dbh = C4::Context->dbh;
my $set; my $set;
if ( defined $token->{'set'} ) { if ( defined $token->{'set'} ) {
@ -127,7 +127,7 @@ sub GetRecords {
$count++; $count++;
if ( $count > $max ) { if ( $count > $max ) {
$self->resumptionToken( $self->resumptionToken(
new Koha::OAI::Server::ResumptionToken( Koha::OAI::Server::ResumptionToken->new(
metadataPrefix => $token->{metadata_prefix}, metadataPrefix => $token->{metadata_prefix},
from => $token->{from}, from => $token->{from},
until => $token->{until}, until => $token->{until},
@ -165,7 +165,7 @@ sub GetRecords {
} else { } else {
$timestamp =~ s/ /T/; $timestamp =~ s/ /T/;
$timestamp .= 'Z'; $timestamp .= 'Z';
$self->identifier( new HTTP::OAI::Header( $self->identifier( HTTP::OAI::Header->new(
identifier => $repository->{ koha_identifier} . ':' . $biblionumber, identifier => $repository->{ koha_identifier} . ':' . $biblionumber,
datestamp => $timestamp, datestamp => $timestamp,
status => $deleted ? 'deleted' : undef status => $deleted ? 'deleted' : undef

View File

@ -35,7 +35,7 @@ sub new {
unless ($count) { unless ($count) {
return HTTP::OAI::Response->new( return HTTP::OAI::Response->new(
requestURL => $repository->self_url(), requestURL => $repository->self_url(),
errors => [ new HTTP::OAI::Error( code => 'noRecordsMatch' ) ], errors => [ HTTP::OAI::Error->new( code => 'noRecordsMatch' ) ],
); );
} }

View File

@ -35,7 +35,7 @@ sub new {
unless ($count) { unless ($count) {
return HTTP::OAI::Response->new( return HTTP::OAI::Response->new(
requestURL => $repository->self_url(), requestURL => $repository->self_url(),
errors => [ new HTTP::OAI::Error( code => 'noRecordsMatch' ) ], errors => [ HTTP::OAI::Error->new( code => 'noRecordsMatch' ) ],
); );
} }

View File

@ -54,7 +54,7 @@ sub new {
} }
$self->resumptionToken( $self->resumptionToken(
new Koha::OAI::Server::ResumptionToken( Koha::OAI::Server::ResumptionToken->new(
metadataPrefix => $token->{metadata_prefix}, metadataPrefix => $token->{metadata_prefix},
offset => $pos offset => $pos
) )

View File

@ -32,7 +32,7 @@ sub new {
my $self = $class->SUPER::new(%args); my $self = $class->SUPER::new(%args);
$timestamp =~ s/ /T/, $timestamp .= 'Z'; $timestamp =~ s/ /T/, $timestamp .= 'Z';
$self->header( new HTTP::OAI::Header( $self->header( HTTP::OAI::Header->new(
identifier => $args{identifier}, identifier => $args{identifier},
datestamp => $timestamp, datestamp => $timestamp,
) ); ) );

View File

@ -127,7 +127,7 @@ sub new {
# Is metadataPrefix supported by the repository? # Is metadataPrefix supported by the repository?
my $mdp = param('metadataPrefix') || ''; my $mdp = param('metadataPrefix') || '';
if ( $mdp && !grep { $_ eq $mdp } @{$self->{ koha_metadata_format }} ) { if ( $mdp && !grep { $_ eq $mdp } @{$self->{ koha_metadata_format }} ) {
push @errs, new HTTP::OAI::Error( push @errs, HTTP::OAI::Error->new(
code => 'cannotDisseminateFormat', code => 'cannotDisseminateFormat',
message => "Dissemination as '$mdp' is not supported", message => "Dissemination as '$mdp' is not supported",
); );

View File

@ -118,7 +118,7 @@ sub generate_as_pdf {
$letter->{'title'} =~ s/<<today>>/$today/g; $letter->{'title'} =~ s/<<today>>/$today/g;
$letter->{'content'} =~ s/<<today>>/$today/g; $letter->{'content'} =~ s/<<today>>/$today/g;
my $tmpl = C4::Templates::gettemplate('batch/print-notices.tt', 'intranet', new CGI); my $tmpl = C4::Templates::gettemplate('batch/print-notices.tt', 'intranet', CGI->new);
$tmpl->param( $tmpl->param(
stylesheet => C4::Context->preference("NoticeCSS"), stylesheet => C4::Context->preference("NoticeCSS"),
today => $today, today => $today,

View File

@ -79,7 +79,7 @@ sub get_suggestions {
'su-br', 'su-br',
'su-rl' 'su-rl'
); );
my $cgi = new CGI; my $cgi = CGI->new;
my $template = C4::Templates::gettemplate('text/explodedterms.tt', 'opac', $cgi); my $template = C4::Templates::gettemplate('text/explodedterms.tt', 'opac', $cgi);
my @results; my @results;
foreach my $index (@indexes) { foreach my $index (@indexes) {

View File

@ -57,7 +57,7 @@ sub printorders {
$pdf->mediabox($height/mm, $width/mm); $pdf->mediabox($height/mm, $width/mm);
my $page = $pdf->page(); my $page = $pdf->page();
my $pdftable = new PDF::Table(); my $pdftable = PDF::Table->new();
my $abaskets; my $abaskets;
my $arrbasket; my $arrbasket;

View File

@ -57,7 +57,7 @@ sub printorders {
$pdf->mediabox($height/mm, $width/mm); $pdf->mediabox($height/mm, $width/mm);
my $page = $pdf->page(); my $page = $pdf->page();
my $pdftable = new PDF::Table(); my $pdftable = PDF::Table->new();
my $abaskets; my $abaskets;
my $arrbasket; my $arrbasket;

View File

@ -82,7 +82,7 @@ sub printorders {
. ( $delivery_library ? "delivery at " . $delivery_library->branchname : "" ) . ( $delivery_library ? "delivery at " . $delivery_library->branchname : "" )
); );
my $pdftable = new PDF::Table(); my $pdftable = PDF::Table->new();
my $abaskets; my $abaskets;
my $arrbasket; my $arrbasket;
my @keys = ('Document', 'Qty', 'RRP tax exc.', 'RRP tax inc.', 'Discount', 'Discount price', 'Tax rate', 'Total tax exc.', 'Total tax inc.'); my @keys = ('Document', 'Qty', 'RRP tax exc.', 'RRP tax inc.', 'Discount', 'Discount price', 'Tax rate', 'Total tax exc.', 'Total tax inc.');
@ -200,7 +200,7 @@ sub printbaskets {
$text->font( $pdf->corefont("Times", -encoding => "utf8"), 6/mm ); $text->font( $pdf->corefont("Times", -encoding => "utf8"), 6/mm );
$text->translate(30/mm, ($height-28.5)/mm); $text->translate(30/mm, ($height-28.5)/mm);
$text->text($libraryname); $text->text($libraryname);
my $pdftable = new PDF::Table(); my $pdftable = PDF::Table->new();
my $abaskets; my $abaskets;
my $arrbasket; my $arrbasket;
# header of the table # header of the table

View File

@ -82,7 +82,7 @@ sub printorders {
. ( $delivery_library ? "livraison à " . $delivery_library->branchname : "" ) . ( $delivery_library ? "livraison à " . $delivery_library->branchname : "" )
); );
my $pdftable = new PDF::Table(); my $pdftable = PDF::Table->new();
my $abaskets; my $abaskets;
my $arrbasket; my $arrbasket;
my @keys = ('Document', 'Qté', 'Prix', 'Prix net', '% Remise', 'Remise', 'Taux TVA', 'Total HT', 'Total TTC'); my @keys = ('Document', 'Qté', 'Prix', 'Prix net', '% Remise', 'Remise', 'Taux TVA', 'Total HT', 'Total TTC');
@ -201,7 +201,7 @@ sub printbaskets {
$text->font( $pdf->corefont("Times", -encoding => "utf8"), 6/mm ); $text->font( $pdf->corefont("Times", -encoding => "utf8"), 6/mm );
$text->translate(30/mm, ($height-28.5)/mm); $text->translate(30/mm, ($height-28.5)/mm);
$text->text($libraryname); $text->text($libraryname);
my $pdftable = new PDF::Table(); my $pdftable = PDF::Table->new();
my $abaskets; my $abaskets;
my $arrbasket; my $arrbasket;
# header of the table # header of the table

View File

@ -60,7 +60,7 @@ use C4::Members::Statistics;
#use Smart::Comments '####'; #use Smart::Comments '####';
my $query = new CGI; my $query = CGI->new;
my ( $template, $loggedinuser, $cookie ) = get_template_and_user( my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
{ {
template_name => "about.tt", template_name => "about.tt",
@ -208,7 +208,7 @@ my $warnNoActiveCurrency = (! defined Koha::Acquisition::Currencies->get_active)
my @xml_config_warnings; my @xml_config_warnings;
my $context = new C4::Context; my $context = C4::Context->new;
if ( C4::Context->config('zebra_bib_index_mode') if ( C4::Context->config('zebra_bib_index_mode')
and C4::Context->config('zebra_bib_index_mode') eq 'grs1' ) and C4::Context->config('zebra_bib_index_mode') eq 'grs1' )

View File

@ -26,7 +26,7 @@ use C4::Members;
use Koha::Patron::Categories; use Koha::Patron::Categories;
my $input = new CGI; my $input = CGI->new;
my $dbh = C4::Context->dbh; my $dbh = C4::Context->dbh;

View File

@ -135,7 +135,7 @@ use C4::Barcodes;
# FIXME: This needs to do actual error checking and possibly return user to the same form, # FIXME: This needs to do actual error checking and possibly return user to the same form,
# not just blindly call C4 functions and print a redirect. # not just blindly call C4 functions and print a redirect.
my $input = new CGI; my $input = CGI->new;
my $use_ACQ_framework = $input->param('use_ACQ_framework'); my $use_ACQ_framework = $input->param('use_ACQ_framework');
# Check if order total amount exceed allowed budget # Check if order total amount exceed allowed budget

View File

@ -50,7 +50,7 @@ use Koha::Acquisition::Orders;
use Koha::Acquisition::Booksellers; use Koha::Acquisition::Booksellers;
use Koha::Patrons; use Koha::Patrons;
my $input = new CGI; my $input = CGI->new;
my ($template, $loggedinuser, $cookie, $userflags) = get_template_and_user({ my ($template, $loggedinuser, $cookie, $userflags) = get_template_and_user({
template_name => "acqui/addorderiso2709.tt", template_name => "acqui/addorderiso2709.tt",
query => $input, query => $input,

View File

@ -62,7 +62,7 @@ unless ($status eq "ok") {
exit 0; exit 0;
} }
my $input = new CGI; my $input = CGI->new;
my $name = $input->param('name'); my $name = $input->param('name');
my $category = $input->param('category'); my $category = $input->param('category');
my $default = $input->param('default'); my $default = $input->param('default');

View File

@ -74,7 +74,7 @@ the supplier this script have to display the basket.
=cut =cut
our $query = new CGI; our $query = CGI->new;
our $basketno = $query->param('basketno'); our $basketno = $query->param('basketno');
our $ean = $query->param('ean'); our $ean = $query->param('ean');
our $booksellerid = $query->param('booksellerid'); our $booksellerid = $query->param('booksellerid');

View File

@ -59,7 +59,7 @@ use Koha::Acquisition::Booksellers;
use Koha::ItemTypes; use Koha::ItemTypes;
use Koha::Patrons; use Koha::Patrons;
our $input=new CGI; our $input=CGI->new;
our ($template, $loggedinuser, $cookie) our ($template, $loggedinuser, $cookie)
= get_template_and_user({template_name => "acqui/basketgroup.tt", = get_template_and_user({template_name => "acqui/basketgroup.tt",

View File

@ -57,7 +57,7 @@ use Koha::Acquisition::Booksellers;
use Koha::Acquisition::Baskets; use Koha::Acquisition::Baskets;
use Koha::AdditionalFields; use Koha::AdditionalFields;
my $input = new CGI; my $input = CGI->new;
my ( $template, $loggedinuser, $cookie ) = get_template_and_user( my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
{ {
template_name => "acqui/basketheader.tt", template_name => "acqui/basketheader.tt",

View File

@ -37,7 +37,7 @@ use C4::Output;
use C4::Acquisition; use C4::Acquisition;
use Koha::Acquisition::Baskets; use Koha::Acquisition::Baskets;
my $input = new CGI; my $input = CGI->new;
my ($template, $loggedinuser, $cookie, $flags) = get_template_and_user( { my ($template, $loggedinuser, $cookie, $flags) = get_template_and_user( {
template_name => 'acqui/cancelorder.tt', template_name => 'acqui/cancelorder.tt',
query => $input, query => $input,

View File

@ -30,7 +30,7 @@ fetches the budget amount fron the DB
=cut =cut
my $input = new CGI; my $input = CGI->new;
my $budget_id = $input->param('budget_id'); my $budget_id = $input->param('budget_id');
my $total = $input->param('total'); my $total = $input->param('total');

View File

@ -36,7 +36,7 @@ use JSON;
use C4::Output; use C4::Output;
use C4::Items; use C4::Items;
my $input = new CGI; my $input = CGI->new;
my @field = $input->multi_param('field[]'); my @field = $input->multi_param('field[]');
my @value = $input->multi_param('value[]'); my @value = $input->multi_param('value[]');

View File

@ -30,7 +30,7 @@ use Koha::Acquisition::Currencies;
use Koha::Acquisition::Orders; use Koha::Acquisition::Orders;
use Koha::DateUtils qw(dt_from_string output_pref); use Koha::DateUtils qw(dt_from_string output_pref);
my $input = new CGI; my $input = CGI->new;
my $basketno = $input->param('basketno'); my $basketno = $input->param('basketno');
my $op = $input->param('op') || 'search'; # search, select, batch_edit my $op = $input->param('op') || 'search'; # search, select, batch_edit

View File

@ -36,7 +36,7 @@ use Koha::Acquisition::Orders;
use List::MoreUtils qw/any/; use List::MoreUtils qw/any/;
my $input=new CGI; my $input=CGI->new;
my $flagsrequired = {acquisition => 'order_receive'}; my $flagsrequired = {acquisition => 'order_receive'};
checkauth($input, 0, $flagsrequired, 'intranet'); checkauth($input, 0, $flagsrequired, 'intranet');

View File

@ -59,7 +59,7 @@ use C4::Koha;
use Koha::AdditionalFields; use Koha::AdditionalFields;
use Koha::DateUtils; use Koha::DateUtils;
my $input = new CGI; my $input = CGI->new;
my $do_search = $input->param('do_search') || 0; my $do_search = $input->param('do_search') || 0;
my $dbh = C4::Context->dbh; my $dbh = C4::Context->dbh;

View File

@ -35,7 +35,7 @@ use C4::Output;
use C4::Acquisition; use C4::Acquisition;
use Koha::Misc::Files; use Koha::Misc::Files;
my $input = new CGI; my $input = CGI->new;
my ( $template, $loggedinuser, $cookie, $flags ) = get_template_and_user( my ( $template, $loggedinuser, $cookie, $flags ) = get_template_and_user(
{ {
template_name => 'acqui/invoice-files.tt', template_name => 'acqui/invoice-files.tt',

View File

@ -40,7 +40,7 @@ use Koha::DateUtils;
use Koha::Misc::Files; use Koha::Misc::Files;
use Koha::Acquisition::Invoice::Adjustments; use Koha::Acquisition::Invoice::Adjustments;
my $input = new CGI; my $input = CGI->new;
my ( $template, $loggedinuser, $cookie, $flags ) = get_template_and_user( my ( $template, $loggedinuser, $cookie, $flags ) = get_template_and_user(
{ {
template_name => 'acqui/invoice.tt', template_name => 'acqui/invoice.tt',

View File

@ -24,7 +24,7 @@ use C4::Acquisition;
use C4::Output; use C4::Output;
use C4::Context; use C4::Context;
my $input = new CGI; my $input = CGI->new;
my ($template, $loggedinuser, $cookie) = get_template_and_user({ my ($template, $loggedinuser, $cookie) = get_template_and_user({
template_name => "acqui/csv/lateorders.tt", template_name => "acqui/csv/lateorders.tt",
query => $input, query => $input,

View File

@ -55,7 +55,7 @@ use Koha::DateUtils;
use Koha::Acquisition::Orders; use Koha::Acquisition::Orders;
use Koha::CsvProfiles; use Koha::CsvProfiles;
my $input = new CGI; my $input = CGI->new;
my ($template, $loggedinuser, $cookie) = get_template_and_user( my ($template, $loggedinuser, $cookie) = get_template_and_user(
{ {
template_name => "acqui/lateorders.tt", template_name => "acqui/lateorders.tt",

View File

@ -35,7 +35,7 @@ use C4::Acquisition;
use Koha::Acquisition::Booksellers; use Koha::Acquisition::Booksellers;
my $input = new CGI; my $input = CGI->new;
my ($template, $loggedinuser, $cookie, $flags) = get_template_and_user( { my ($template, $loggedinuser, $cookie, $flags) = get_template_and_user( {
template_name => 'acqui/modordernotes.tt', template_name => 'acqui/modordernotes.tt',
query => $input, query => $input,

View File

@ -94,7 +94,7 @@ use Koha::Patrons;
use Koha::RecordProcessor; use Koha::RecordProcessor;
use Koha::Subscriptions; use Koha::Subscriptions;
our $input = new CGI; our $input = CGI->new;
my $booksellerid = $input->param('booksellerid'); # FIXME: else ERROR! my $booksellerid = $input->param('booksellerid'); # FIXME: else ERROR!
my $budget_id = $input->param('budget_id') || 0; my $budget_id = $input->param('budget_id') || 0;
my $title = $input->param('title'); my $title = $input->param('title');

View File

@ -27,7 +27,7 @@ use C4::Serials;
use Koha::Acquisition::Booksellers; use Koha::Acquisition::Booksellers;
my $query = new CGI; my $query = CGI->new;
my $title = $query->param('title_filter'); my $title = $query->param('title_filter');
my $ISSN = $query->param('ISSN_filter'); my $ISSN = $query->param('ISSN_filter');
my $EAN = $query->param('EAN_filter'); my $EAN = $query->param('EAN_filter');

View File

@ -99,7 +99,7 @@ use C4::Budgets;
use Koha::Acquisition::Booksellers; use Koha::Acquisition::Booksellers;
my $input = new CGI; my $input = CGI->new;
# getting the CGI params # getting the CGI params
my $basketno = $input->param('basketno'); my $basketno = $input->param('basketno');

View File

@ -36,7 +36,7 @@ use Koha::Acquisition::Invoice::Adjustments;
use C4::Acquisition; use C4::Acquisition;
my $dbh = C4::Context->dbh; my $dbh = C4::Context->dbh;
my $input = new CGI; my $input = CGI->new;
my $fund_id = $input->param('fund'); my $fund_id = $input->param('fund');
my $fund_code = $input->param('fund_code'); my $fund_code = $input->param('fund_code');

View File

@ -79,7 +79,7 @@ use Koha::DateUtils qw( dt_from_string );
use Koha::ItemTypes; use Koha::ItemTypes;
use Koha::Patrons; use Koha::Patrons;
my $input = new CGI; my $input = CGI->new;
my $dbh = C4::Context->dbh; my $dbh = C4::Context->dbh;
my $invoiceid = $input->param('invoiceid'); my $invoiceid = $input->param('invoiceid');

View File

@ -74,7 +74,7 @@ use Koha::Biblios;
use JSON; use JSON;
my $input=new CGI; my $input=CGI->new;
my $sticky_filters = $input->param('sticky_filters') || 0; my $sticky_filters = $input->param('sticky_filters') || 0;
my ($template, $loggedinuser, $cookie) my ($template, $loggedinuser, $cookie)

View File

@ -24,7 +24,7 @@ use C4::Output;
use Koha::Acquisition::Orders; use Koha::Acquisition::Orders;
use Koha::Patrons; use Koha::Patrons;
my $cgi = new CGI; my $cgi = CGI->new;
my ( $template, $loggedinuser, $cookie ) = get_template_and_user({ my ( $template, $loggedinuser, $cookie ) = get_template_and_user({
template_name => "acqui/showorder.tt", template_name => "acqui/showorder.tt",
query => $cgi, query => $cgi,

View File

@ -38,7 +38,7 @@ use C4::Acquisition;
use Koha::Acquisition::Invoice::Adjustments; use Koha::Acquisition::Invoice::Adjustments;
my $dbh = C4::Context->dbh; my $dbh = C4::Context->dbh;
my $input = new CGI; my $input = CGI->new;
my $bookfund = $input->param('fund'); my $bookfund = $input->param('fund');
my $fund_code = $input->param('fund_code'); my $fund_code = $input->param('fund_code');

View File

@ -28,7 +28,7 @@ use C4::Context;
use C4::Acquisition; use C4::Acquisition;
use Koha::Acquisition::Booksellers; use Koha::Acquisition::Booksellers;
my $input = new CGI; my $input = CGI->new;
my ( $template, $loggedinuser, $cookie ) = get_template_and_user( my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
{ template_name => "acqui/transferorder.tt", { template_name => "acqui/transferorder.tt",
query => $input, query => $input,

View File

@ -55,7 +55,7 @@ use C4::Biblio qw/GetBiblioData/;
use Koha::Acquisition::Booksellers; use Koha::Acquisition::Booksellers;
use Koha::Acquisition::Baskets; use Koha::Acquisition::Baskets;
my $input=new CGI; my $input=CGI->new;
my ($template, $loggedinuser, $cookie) my ($template, $loggedinuser, $cookie)
= get_template_and_user({template_name => "acqui/uncertainprice.tt", = get_template_and_user({template_name => "acqui/uncertainprice.tt",

View File

@ -58,7 +58,7 @@ use Koha::Acquisition::Bookseller::Contacts;
use Koha::Acquisition::Booksellers; use Koha::Acquisition::Booksellers;
use CGI qw ( -utf8 ); use CGI qw ( -utf8 );
my $input=new CGI; my $input=CGI->new;
checkauth( $input, 0, { acquisition => 'vendors_manage' }, 'intranet' ); checkauth( $input, 0, { acquisition => 'vendors_manage' }, 'intranet' );

View File

@ -31,7 +31,7 @@ use C4::Koha;
use Koha::Acquisition::Booksellers; use Koha::Acquisition::Booksellers;
use Koha::BiblioFrameworks; use Koha::BiblioFrameworks;
my $input = new CGI; my $input = CGI->new;
my $biblionumber = $input->param('biblionumber')||0; my $biblionumber = $input->param('biblionumber')||0;
my $frameworkcode = $input->param('frameworkcode') || q{}; my $frameworkcode = $input->param('frameworkcode') || q{};
my $title = $input->param('title'); my $title = $input->param('title');

View File

@ -26,7 +26,7 @@ use C4::Members;
use Koha::Patron::Categories; use Koha::Patron::Categories;
my $input = new CGI; my $input = CGI->new;
my $dbh = C4::Context->dbh; my $dbh = C4::Context->dbh;

View File

@ -23,7 +23,7 @@ use C4::Koha;
use C4::Output; use C4::Output;
use Koha::AdditionalFields; use Koha::AdditionalFields;
my $input = new CGI; my $input = CGI->new;
my %flagsrequired; my %flagsrequired;
$flagsrequired{parameters} = 'manage_additional_fields'; $flagsrequired{parameters} = 'manage_additional_fields';

View File

@ -22,7 +22,7 @@ use C4::Auth;
use C4::Output; use C4::Output;
use Koha::Plugins; use Koha::Plugins;
my $query = new CGI; my $query = CGI->new;
my $plugins_enabled = C4::Context->config("enable_plugins"); my $plugins_enabled = C4::Context->config("enable_plugins");
my $mana_url = C4::Context->config('mana_config'); my $mana_url = C4::Context->config('mana_config');

View File

@ -43,7 +43,7 @@ use CGI qw ( -utf8 );
use C4::Koha; use C4::Koha;
use Koha::KeyboardShortcuts; use Koha::KeyboardShortcuts;
my $input = new CGI; my $input = CGI->new;
my $op = $input->param('op') || 'list'; my $op = $input->param('op') || 'list';
my ( $template, $loggedinuser, $cookie ) = get_template_and_user( my ( $template, $loggedinuser, $cookie ) = get_template_and_user(

View File

@ -61,7 +61,7 @@ use Koha::Acquisition::Currencies;
my $dbh = C4::Context->dbh; my $dbh = C4::Context->dbh;
my $input = new CGI; my $input = CGI->new;
my $searchfield = $input->param('searchfield') // ''; my $searchfield = $input->param('searchfield') // '';
my $budget_period_id = $input->param('budget_period_id'); my $budget_period_id = $input->param('budget_period_id');

View File

@ -36,7 +36,7 @@ use C4::Debug;
use Koha::Acquisition::Currencies; use Koha::Acquisition::Currencies;
use Koha::Patrons; use Koha::Patrons;
my $input = new CGI; my $input = CGI->new;
my $dbh = C4::Context->dbh; my $dbh = C4::Context->dbh;
my ($template, $borrowernumber, $cookie, $staffflags ) = get_template_and_user( my ($template, $borrowernumber, $cookie, $staffflags ) = get_template_and_user(

View File

@ -30,7 +30,7 @@ use Koha::DateUtils;
use Koha::Acquisition::Booksellers; use Koha::Acquisition::Booksellers;
my $input = new CGI; my $input = CGI->new;
my $contractnumber = $input->param('contractnumber'); my $contractnumber = $input->param('contractnumber');
my $booksellerid = $input->param('booksellerid'); my $booksellerid = $input->param('booksellerid');
my $op = $input->param('op') || 'list'; my $op = $input->param('op') || 'list';

View File

@ -36,7 +36,7 @@ use C4::Auth;
use C4::Debug; use C4::Debug;
use Koha::Acquisition::Currencies; use Koha::Acquisition::Currencies;
our $input = new CGI; our $input = CGI->new;
#### $input #### $input
my $dbh = C4::Context->dbh; my $dbh = C4::Context->dbh;

View File

@ -25,7 +25,7 @@ use C4::Output;
use Koha::AudioAlert; use Koha::AudioAlert;
use Koha::AudioAlerts; use Koha::AudioAlerts;
my $cgi = new CGI; my $cgi = CGI->new;
my $selector = $cgi->param('selector'); my $selector = $cgi->param('selector');
my $sound = $cgi->param('sound'); my $sound = $cgi->param('sound');

View File

@ -48,7 +48,7 @@ sub auth_subfield_structure_exists {
return @$rows > 0; return @$rows > 0;
} }
my $input = new CGI; my $input = CGI->new;
my $tagfield = $input->param('tagfield'); my $tagfield = $input->param('tagfield');
my $tagsubfield = $input->param('tagsubfield'); my $tagsubfield = $input->param('tagsubfield');
my $authtypecode = $input->param('authtypecode'); my $authtypecode = $input->param('authtypecode');

View File

@ -29,7 +29,7 @@ use C4::Context;
use Koha::Authority::Types; use Koha::Authority::Types;
# retrieve parameters # retrieve parameters
my $input = new CGI; my $input = CGI->new;
my $authtypecode = $input->param('authtypecode') || ''; # set to select framework my $authtypecode = $input->param('authtypecode') || ''; # set to select framework
my $existingauthtypecode = $input->param('existingauthtypecode') || ''; # set when we have to create a new framework (in authtype) by copying an old one (in existingauthtype) my $existingauthtypecode = $input->param('existingauthtypecode') || ''; # set when we have to create a new framework (in authtype) by copying an old one (in existingauthtype)

View File

@ -31,7 +31,7 @@ use Koha::AuthorisedValues;
use Koha::AuthorisedValueCategories; use Koha::AuthorisedValueCategories;
use Koha::Libraries; use Koha::Libraries;
my $input = new CGI; my $input = CGI->new;
my $id = $input->param('id'); my $id = $input->param('id');
my $op = $input->param('op') || 'list'; my $op = $input->param('op') || 'list';
my $searchfield = $input->param('searchfield'); my $searchfield = $input->param('searchfield');

View File

@ -28,7 +28,7 @@ use C4::Output;
use Koha::Authorities; use Koha::Authorities;
use Koha::Authority::Types; use Koha::Authority::Types;
my $input = new CGI; my $input = CGI->new;
my $authtypecode = $input->param('authtypecode'); my $authtypecode = $input->param('authtypecode');
my $op = $input->param('op') || 'list'; my $op = $input->param('op') || 'list';
my @messages; my @messages;

View File

@ -28,7 +28,7 @@ use Koha::BiblioFramework;
use Koha::BiblioFrameworks; use Koha::BiblioFrameworks;
use Koha::Caches; use Koha::Caches;
my $input = new CGI; my $input = CGI->new;
my $frameworkcode = $input->param('frameworkcode') || q||; my $frameworkcode = $input->param('frameworkcode') || q||;
my $op = $input->param('op') || q|list|; my $op = $input->param('op') || q|list|;
my $cache = Koha::Caches->get_instance(); my $cache = Koha::Caches->get_instance();

View File

@ -27,7 +27,7 @@ use C4::Output;
use C4::Koha; use C4::Koha;
use C4::Circulation qw{ IsBranchTransferAllowed DeleteBranchTransferLimits CreateBranchTransferLimit }; use C4::Circulation qw{ IsBranchTransferAllowed DeleteBranchTransferLimits CreateBranchTransferLimit };
my $input = new CGI; my $input = CGI->new;
my ($template, $loggedinuser, $cookie) my ($template, $loggedinuser, $cookie)
= get_template_and_user({template_name => "admin/branch_transfer_limits.tt", = get_template_and_user({template_name => "admin/branch_transfer_limits.tt",

View File

@ -31,7 +31,7 @@ use Koha::DateUtils;
use Koha::Patron::Categories; use Koha::Patron::Categories;
use Koha::Libraries; use Koha::Libraries;
my $input = new CGI; my $input = CGI->new;
my $searchfield = $input->param('description') // q||; my $searchfield = $input->param('description') // q||;
my $categorycode = $input->param('categorycode'); my $categorycode = $input->param('categorycode');
my $op = $input->param('op') // 'list'; my $op = $input->param('op') // 'list';

View File

@ -31,7 +31,7 @@ called by aqbudgets.pl and neworderempty.pl
=cut =cut
my $input = new CGI; my $input = CGI->new;
my $budget_id = $input->param('budget_id'); my $budget_id = $input->param('budget_id');
my $new_parent_id = $input->param('new_parent'); my $new_parent_id = $input->param('new_parent');

View File

@ -34,7 +34,7 @@ to determine whether the new parent budget (or period) has enough unallocated fu
=cut =cut
my $dbh = C4::Context->dbh; my $dbh = C4::Context->dbh;
my $input = new CGI; my $input = CGI->new;
my $total = $input->param('total'); my $total = $input->param('total');
my $budget_id = $input->param('budget_id'); my $budget_id = $input->param('budget_id');

View File

@ -26,7 +26,7 @@ use C4::Context;
use C4::Biblio; use C4::Biblio;
my $input = new CGI; my $input = CGI->new;
my ($template, $borrowernumber, $cookie) my ($template, $borrowernumber, $cookie)
= get_template_and_user({template_name => "admin/checkmarc.tt", = get_template_and_user({template_name => "admin/checkmarc.tt",

View File

@ -26,7 +26,7 @@ use C4::Output;
use Koha::Cities; use Koha::Cities;
my $input = new CGI; my $input = CGI->new;
my $city_name_filter = $input->param('city_name_filter') // q||; my $city_name_filter = $input->param('city_name_filter') // q||;
my $cityid = $input->param('cityid'); my $cityid = $input->param('cityid');
my $op = $input->param('op') || 'list'; my $op = $input->param('op') || 'list';

View File

@ -33,7 +33,7 @@ use Koha::ClassSplitRules;
my $script_name = "/cgi-bin/koha/admin/classsources.pl"; my $script_name = "/cgi-bin/koha/admin/classsources.pl";
my $input = new CGI; my $input = CGI->new;
my $op = $input->param('op') || 'list'; my $op = $input->param('op') || 'list';
my $cn_source = $input->param('cn_source'); my $cn_source = $input->param('cn_source');
my $class_sort_rule = $input->param('class_sort_rule'); my $class_sort_rule = $input->param('class_sort_rule');

View File

@ -34,7 +34,7 @@ use C4::Koha;
use C4::Debug; use C4::Debug;
use Koha::CirculationRules; use Koha::CirculationRules;
my $input = new CGI; my $input = CGI->new;
my ($template, $loggedinuser, $cookie) my ($template, $loggedinuser, $cookie)
= get_template_and_user({template_name => "admin/clone-rules.tt", = get_template_and_user({template_name => "admin/clone-rules.tt",

View File

@ -7,7 +7,7 @@ use C4::Auth;
use C4::Context; use C4::Context;
use C4::Output; use C4::Output;
use C4::Utils::DataTables::TablesSettings qw( get_modules ); use C4::Utils::DataTables::TablesSettings qw( get_modules );
my $input = new CGI; my $input = CGI->new;
my ( $template, $loggedinuser, $cookie ) = get_template_and_user( my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
{ {

View File

@ -28,7 +28,7 @@ use C4::Output;
use Koha::Account::CreditType; use Koha::Account::CreditType;
use Koha::Account::CreditTypes; use Koha::Account::CreditTypes;
my $input = new CGI; my $input = CGI->new;
my $code = $input->param('code'); my $code = $input->param('code');
my $op = $input->param('op') || 'list'; my $op = $input->param('op') || 'list';
my @messages; my @messages;

View File

@ -28,7 +28,7 @@ use C4::Output;
use Koha::Account::DebitType; use Koha::Account::DebitType;
use Koha::Account::DebitTypes; use Koha::Account::DebitTypes;
my $input = new CGI; my $input = CGI->new;
my $code = $input->param('code'); my $code = $input->param('code');
my $op = $input->param('op') || 'list'; my $op = $input->param('op') || 'list';
my @messages; my @messages;

View File

@ -26,7 +26,7 @@ use C4::Output;
use Koha::Desks; use Koha::Desks;
my $input = new CGI; my $input = CGI->new;
my $searchfield = $input->param('desk_name') // q||; my $searchfield = $input->param('desk_name') // q||;
my $desk_id = $input->param('desk_id') || ''; my $desk_id = $input->param('desk_id') || '';
my $op = $input->param('op') || 'list'; my $op = $input->param('op') || 'list';

View File

@ -9,7 +9,7 @@ use Koha::SuggestionEngine;
use Module::Load::Conditional qw(can_load); use Module::Load::Conditional qw(can_load);
use JSON; use JSON;
my $input = new CGI; my $input = CGI->new;
my ($template, $loggedinuser, $cookie) my ($template, $loggedinuser, $cookie)
= get_template_and_user({template_name => "admin/didyoumean.tt", = get_template_and_user({template_name => "admin/didyoumean.tt",

View File

@ -38,7 +38,7 @@ if ($auth_status eq 'ok') {
$authenticated = 1; $authenticated = 1;
} }
my $input = new CGI; my $input = CGI->new;
unless ($authenticated) { unless ($authenticated) {
print $input->header(-type => 'text/plain', -status => '403 Forbidden'); print $input->header(-type => 'text/plain', -status => '403 Forbidden');

View File

@ -111,7 +111,7 @@ sub dispatch {
show => \&show, show => \&show,
toggle => \&toggle, toggle => \&toggle,
); );
my $input = new CGI; my $input = CGI->new;
my $action = $input->param('action') || 'show'; my $action = $input->param('action') || 'show';
if (not exists $handler{$action}) { if (not exists $handler{$action}) {
my $status = 400; my $status = 400;

View File

@ -24,7 +24,7 @@ use C4::Output;
use Koha::Item::Search::Field qw(GetItemSearchField ModItemSearchField); use Koha::Item::Search::Field qw(GetItemSearchField ModItemSearchField);
my $cgi = new CGI; my $cgi = CGI->new;
my ($template, $borrowernumber, $cookie) = get_template_and_user({ my ($template, $borrowernumber, $cookie) = get_template_and_user({
template_name => 'admin/items_search_field.tt', template_name => 'admin/items_search_field.tt',

View File

@ -24,7 +24,7 @@ use C4::Output;
use Koha::Item::Search::Field qw(AddItemSearchField GetItemSearchFields DelItemSearchField); use Koha::Item::Search::Field qw(AddItemSearchField GetItemSearchFields DelItemSearchField);
my $cgi = new CGI; my $cgi = CGI->new;
my ($template, $borrowernumber, $cookie) = get_template_and_user({ my ($template, $borrowernumber, $cookie) = get_template_and_user({
template_name => 'admin/items_search_fields.tt', template_name => 'admin/items_search_fields.tt',

View File

@ -35,7 +35,7 @@ use Koha::ItemTypes;
use Koha::ItemType; use Koha::ItemType;
use Koha::Localizations; use Koha::Localizations;
my $input = new CGI; my $input = CGI->new;
my $searchfield = $input->param('description'); my $searchfield = $input->param('description');
my $itemtype_code = $input->param('itemtype'); my $itemtype_code = $input->param('itemtype');
my $op = $input->param('op') // 'list'; my $op = $input->param('op') // 'list';

View File

@ -29,7 +29,7 @@ use Koha::BiblioFrameworks;
use Koha::Caches; use Koha::Caches;
use Koha::MarcSubfieldStructures; use Koha::MarcSubfieldStructures;
my $input = new CGI; my $input = CGI->new;
my ( $template, $borrowernumber, $cookie ) = get_template_and_user ( my ( $template, $borrowernumber, $cookie ) = get_template_and_user (
{ {

View File

@ -27,7 +27,7 @@ use Koha::Libraries;
use Koha::Library::Group; use Koha::Library::Group;
use Koha::Library::Groups; use Koha::Library::Groups;
my $cgi = new CGI; my $cgi = CGI->new;
my ( $template, $loggedinuser, $cookie ) = get_template_and_user( my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
{ {

View File

@ -26,7 +26,7 @@ use Koha::Localizations;
use CGI qw( -utf8 ); use CGI qw( -utf8 );
my $query = new CGI; my $query = CGI->new;
my ( $template, $borrowernumber, $cookie ) = get_template_and_user( my ( $template, $borrowernumber, $cookie ) = get_template_and_user(
{ template_name => "admin/localization.tt", { template_name => "admin/localization.tt",

View File

@ -61,7 +61,7 @@ sub marc_subfield_structure_exists {
return @$rows > 0; return @$rows > 0;
} }
my $input = new CGI; my $input = CGI->new;
my $tagfield = $input->param('tagfield'); my $tagfield = $input->param('tagfield');
my $tagsubfield = $input->param('tagsubfield'); my $tagsubfield = $input->param('tagsubfield');
my $frameworkcode = $input->param('frameworkcode'); my $frameworkcode = $input->param('frameworkcode');

View File

@ -31,7 +31,7 @@ use Koha::AuthorisedValues;
use Koha::BiblioFrameworks; use Koha::BiblioFrameworks;
# retrieve parameters # retrieve parameters
my $input = new CGI; my $input = CGI->new;
my $frameworkcode = $input->param('frameworkcode') || ''; # set to select framework my $frameworkcode = $input->param('frameworkcode') || ''; # set to select framework
my $existingframeworkcode = $input->param('existingframeworkcode') || ''; my $existingframeworkcode = $input->param('existingframeworkcode') || '';
my $searchfield = $input->param('searchfield') || 0; my $searchfield = $input->param('searchfield') || 0;

View File

@ -29,7 +29,7 @@ use C4::Matcher qw/valid_normalization_routines/;
my $script_name = "/cgi-bin/koha/admin/matching-rules.pl"; my $script_name = "/cgi-bin/koha/admin/matching-rules.pl";
our $input = new CGI; our $input = CGI->new;
my $op = $input->param('op') || ''; my $op = $input->param('op') || '';

View File

@ -39,7 +39,7 @@ use C4::OAI::Sets;
use Data::Dumper; use Data::Dumper;
my $input = new CGI; my $input = CGI->new;
my ($template, $loggedinuser, $cookie, $flags) = get_template_and_user( { my ($template, $loggedinuser, $cookie, $flags) = get_template_and_user( {
template_name => 'admin/oai_set_mappings.tt', template_name => 'admin/oai_set_mappings.tt',
query => $input, query => $input,

View File

@ -35,7 +35,7 @@ use C4::OAI::Sets;
use Data::Dumper; use Data::Dumper;
my $input = new CGI; my $input = CGI->new;
my ($template, $loggedinuser, $cookie, $flags) = get_template_and_user( { my ($template, $loggedinuser, $cookie, $flags) = get_template_and_user( {
template_name => 'admin/oai_sets.tt', template_name => 'admin/oai_sets.tt',
query => $input, query => $input,

View File

@ -36,7 +36,7 @@ use Koha::Patron::Categories;
my $script_name = "/cgi-bin/koha/admin/patron-attr-types.pl"; my $script_name = "/cgi-bin/koha/admin/patron-attr-types.pl";
our $input = new CGI; our $input = CGI->new;
my $op = $input->param('op') || ''; my $op = $input->param('op') || '';

Some files were not shown because too many files have changed in this diff Show More