[Koha-patches] [PATCH 2/2] Bug 5725 follow up

Colin Campbell colin.campbell at ptfs-europe.com
Wed Feb 9 16:08:48 CET 2011


On 09/02/11 01:13, Chris Cormack wrote:
> From: Paul Poulain <paul.poulain at biblibre.com>
> 
> Owen noticed the batchedit was not working. This was because we made a patch months ago to change the GetBiblio API
> (the 1st returned arg is useless)
> This patch is not in main trunk, resulting in the error owen has noticed.
> 
> This patch goes back to official API (even if it is clumsy : the patch we did does not apply anymore)
> ---
>  tools/batchedit.pl |    4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/tools/batchedit.pl b/tools/batchedit.pl
> index 06fcd0f..8bf01b6 100755
> --- a/tools/batchedit.pl
> +++ b/tools/batchedit.pl
> @@ -175,7 +175,7 @@ if($input->param('field') and not defined $op){
>          my @repvals    = $input->param('repval');
>          foreach my $biblionumber ( @biblionumbers ){
>              my $record = GetMarcBiblio($biblionumber);
> -            my $biblio = GetBiblio($biblionumber);
> +            my ($count, $biblio) = GetBiblio($biblionumber);
>              my $report = 0;
>              my @failed_actions;
>              for(my $i = 0 ; $i < scalar(@fields) ; $i++ ){
> @@ -209,7 +209,7 @@ if($input->param('field') and not defined $op){
>  my @biblioinfos;
>  
>  for my $biblionumber (@biblionumbers){
> -    my $biblio = GetBiblio($biblionumber);
> +    my ($count,$biblio) = GetBiblio($biblionumber);
>      if (defined $op){
>          $biblio->{$report_actions{$biblionumber}->{status}}=1;
>          $biblio->{failed_actions}=$report_actions{$biblionumber}->{failed_actions};

Might be better to flag that the first parameter is not used by coding
(undef, $biblio) = GetBiblio() rather than creating an unused variable
for subsequent patchers to question.

C.

-- 
Colin Campbell
Chief Software Engineer,
PTFS Europe Limited
Content Management and Library Solutions
+44 (0) 845 557 5634 (phone)
+44 (0) 7759 633626  (mobile)
colin.campbell at ptfs-europe.com
skype: colin_campbell2

http://www.ptfs-europe.com


More information about the Koha-patches mailing list