From: Paul Poulain Date: Thu, 8 Dec 2011 10:05:35 +0000 (+0100) Subject: Merge remote-tracking branch 'origin/new/bug_7141' X-Git-Url: http://git.rot13.org/?a=commitdiff_plain;h=484c1f6deaba6851d53ab52e41837a28471774e3;hp=ce599119321cd2c931cf55b0d20cb00f8f1ab5b2;p=koha.git Merge remote-tracking branch 'origin/new/bug_7141' --- diff --git a/catalogue/showmarc.pl b/catalogue/showmarc.pl index a54894b3e2..32ea2f6f3f 100755 --- a/catalogue/showmarc.pl +++ b/catalogue/showmarc.pl @@ -23,7 +23,7 @@ use strict; #use warnings; FIXME - Bug 2505 -use open OUT=>':utf8', ':std'; +use open OUT=>":encoding(UTF-8)", ':std'; # standard or CPAN modules used use CGI qw(:standard); diff --git a/cataloguing/addbiblio.pl b/cataloguing/addbiblio.pl index 1a829897d2..71d43d7c63 100755 --- a/cataloguing/addbiblio.pl +++ b/cataloguing/addbiblio.pl @@ -159,7 +159,7 @@ sub MARCfindbreeding { =cut -sub build_authorized_values_list ($$$$$$$) { +sub build_authorized_values_list { my ( $tag, $subfield, $value, $dbh, $authorised_values_sth,$index_tag,$index_subfield ) = @_; my @authorised_values; @@ -252,7 +252,7 @@ sub build_authorized_values_list ($$$$$$$) { =cut -sub CreateKey(){ +sub CreateKey { return int(rand(1000000)); } @@ -263,7 +263,7 @@ sub CreateKey(){ =cut -sub GetMandatoryFieldZ3950($){ +sub GetMandatoryFieldZ3950 { my $frameworkcode = shift; my @isbn = GetMarcFromKohaField('biblioitems.isbn',$frameworkcode); my @title = GetMarcFromKohaField('biblio.title',$frameworkcode); @@ -536,7 +536,7 @@ sub format_indicator { return $ind_value; } -sub build_tabs ($$$$$) { +sub build_tabs { my ( $template, $record, $dbh, $encoding,$input ) = @_; # fill arrays diff --git a/cataloguing/additem.pl b/cataloguing/additem.pl index 4442ed328a..d8bc877d6e 100755 --- a/cataloguing/additem.pl +++ b/cataloguing/additem.pl @@ -381,7 +381,8 @@ if ($op eq "additem") { my ($tagfield,$tagsubfield) = &GetMarcFromKohaField("items.barcode",$frameworkcode); # If there is a barcode and we can't find him new values, we can't add multiple copies - my $testbarcode = $barcodeobj->next_value($oldbarcode) if $barcodeobj; + my $testbarcode; + $testbarcode = $barcodeobj->next_value($oldbarcode) if $barcodeobj; if ($oldbarcode && !$testbarcode) { push @errors, "no_next_barcode"; diff --git a/cataloguing/merge.pl b/cataloguing/merge.pl index e3ee725701..0b881f1c13 100755 --- a/cataloguing/merge.pl +++ b/cataloguing/merge.pl @@ -250,7 +250,7 @@ Create a random value to set it into the input name =cut -sub createKey(){ +sub createKey { return int(rand(1000000)); } diff --git a/cataloguing/ysearch.pl b/cataloguing/ysearch.pl index 5cd0205a23..a697ddba4e 100755 --- a/cataloguing/ysearch.pl +++ b/cataloguing/ysearch.pl @@ -39,7 +39,7 @@ my $field = $input->param('field'); # Prevent from disclosing data die() unless ($table eq "biblioitems"); -binmode STDOUT, ":utf8"; +binmode STDOUT, ":encoding(UTF-8)"; print $input->header( -type => 'text/plain', -charset => 'UTF-8' ); my ( $auth_status, $sessionID ) = check_cookie_auth( $input->cookie('CGISESSID'), { cataloguing => '*' } ); diff --git a/labels/label-create-csv.pl b/labels/label-create-csv.pl index 50262df8c3..6e2263f5d3 100755 --- a/labels/label-create-csv.pl +++ b/labels/label-create-csv.pl @@ -1,5 +1,23 @@ #!/usr/bin/perl +# Copyright Koha development team 2011 +# +# 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 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., 59 Temple Place, +# Suite 330, Boston, MA 02111-1307 USA +# + use strict; use warnings; @@ -13,11 +31,14 @@ use C4::Labels 1.000000; my $cgi = new CGI; -my $batch_id = $cgi->param('batch_id') if $cgi->param('batch_id'); +my $batch_id; +my @label_ids; +my @item_numbers; +$batch_id = $cgi->param('batch_id') if $cgi->param('batch_id'); my $template_id = $cgi->param('template_id') || undef; my $layout_id = $cgi->param('layout_id') || undef; -my @label_ids = $cgi->param('label_id') if $cgi->param('label_id'); -my @item_numbers = $cgi->param('item_number') if $cgi->param('item_number'); +@label_ids = $cgi->param('label_id') if $cgi->param('label_id'); +@item_numbers = $cgi->param('item_number') if $cgi->param('item_number'); my $items = undef; diff --git a/t/00-testcritic.t b/t/00-testcritic.t index 19e53fb2d7..6018502a40 100755 --- a/t/00-testcritic.t +++ b/t/00-testcritic.t @@ -16,8 +16,8 @@ my @all_koha_dirs = qw( acqui admin authorities basket C4 catalogue cataloguing labels members misc offline_circ opac patroncards reports reserve reviews rotating_collections serials sms suggestion t tags test tools virtualshelves); -my @dirs = qw( acqui admin authorities basket circ debian errors offline_circ reserve reviews rotating_collections -serials sms virtualshelves ); +my @dirs = qw( acqui admin authorities basket catalogue cataloguing circ debian errors labels + offline_circ reserve reviews rotating_collections serials sms virtualshelves ); if ( not $ENV{TEST_QA} ) { my $msg = 'Author test. Set $ENV{TEST_QA} to a true value to run'; diff --git a/t/perlcriticrc b/t/perlcriticrc index 53a34a6ef7..287273c1bb 100644 --- a/t/perlcriticrc +++ b/t/perlcriticrc @@ -1 +1,5 @@ exclude = Miscellanea::RequireRcsKeywords + + +[Perl::Critic::Policy::BuiltinFunctions::ProhibitStringyEval] +allow_includes =1 \ No newline at end of file