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

LAURENT Henri-Damien henridamien.laurent at biblibre.com
Wed Feb 9 16:33:58 CET 2011


Le 09/02/2011 16:08, Colin Campbell a écrit :
> 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.
> 
It has been there for ages with noone questionning...
This is the magic of Koha.
-- 
Henri-Damien LAURNET


More information about the Koha-patches mailing list