View | Details | Raw Unified | Return to bug 12747
Collapse All | Expand All

(-)a/C4/Breeding.pm (+56 lines)
Lines 25-30 use C4::Biblio; Link Here
25
use C4::Koha;
25
use C4::Koha;
26
use C4::Charset;
26
use C4::Charset;
27
use MARC::File::USMARC;
27
use MARC::File::USMARC;
28
use MARC::Field;
28
use C4::ImportBatch;
29
use C4::ImportBatch;
29
use C4::AuthoritiesMarc; #GuessAuthTypeCode, FindDuplicateAuthority
30
use C4::AuthoritiesMarc; #GuessAuthTypeCode, FindDuplicateAuthority
30
use C4::Languages;
31
use C4::Languages;
Lines 222-227 sub Z3950Search { Link Here
222
        $oConnection[$_]->destroy();
223
        $oConnection[$_]->destroy();
223
    }
224
    }
224
225
226
<<<<<<< HEAD
227
=======
228
    my @servers = ();
229
    foreach my $id (@id) {
230
        push @servers, {id => $id};
231
    }
232
233
    my $pref_addnumber = C4::Context->preference('AdditionalFieldsInZ3950ResultSearch');
234
    $pref_addnumber =~ s/^\s+|\s+$//g;
235
    $pref_addnumber =~ s/\h+/ /g;
236
    if ($pref_addnumber){
237
        $template->param(
238
            additionalFields => '1',
239
        );
240
    }
241
242
>>>>>>> c4c12ed... Bug 12747 - Add extra column in Z3950 search result
225
    $template->param(
243
    $template->param(
226
        breeding_loop => \@breeding_loop,
244
        breeding_loop => \@breeding_loop,
227
        servers => \@servers,
245
        servers => \@servers,
Lines 340-345 sub _add_rowdata { Link Here
340
    }
358
    }
341
    $row->{date}//= $row->{date2};
359
    $row->{date}//= $row->{date2};
342
    $row->{isbn}=_isbn_replace($row->{isbn});
360
    $row->{isbn}=_isbn_replace($row->{isbn});
361
362
    my $pref_addnumber = C4::Context->preference('AdditionalFieldsInZ3950ResultSearch');
363
    $pref_addnumber =~ s/^\s+|\s+$//g;
364
    $pref_addnumber =~ s/\h+/ /g;
365
    my @addnumber_array = split / /, $pref_addnumber;
366
    my @addnumberfields;
367
    foreach (@addnumber_array) {
368
        my $length = length($_);
369
        my $adTag = substr($_, 0, 3);
370
        if ($record->field($adTag)) {
371
           my $field = $record->field($adTag);
372
           my $fieldContent='';
373
           if ($length > 3){
374
               my $adSubfield;
375
               for (my $i=0; $i<$length-4; $i++){ # 4 because 3 digits, 1 dollar sign ($)
376
                  $adSubfield = substr($_, 4+$i, 1);
377
                  $fieldContent = $fieldContent.$field->subfield($adSubfield).' ';
378
               }
379
               push(@addnumberfields, $_);
380
               $row->{$_} = $fieldContent;
381
           }
382
           else {
383
               if($adTag <= 10){
384
                   my $data = $field->data();
385
                   push(@addnumberfields, $_);
386
                   $row->{$_} = $data;
387
               }
388
               else {
389
                   my $subfields_text = $field->as_string();
390
                   push(@addnumberfields, $_);
391
                   $row->{$_} = $subfields_text;
392
               }
393
           }
394
        }
395
    }
396
397
    $row->{'addnumberfields'} = \@addnumberfields;
398
343
    return $row;
399
    return $row;
344
}
400
}
345
401
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/cataloguing.pref (-1 / +4 lines)
Lines 215-217 Cataloging: Link Here
215
                  yes: "do"
215
                  yes: "do"
216
                  no: "don't"
216
                  no: "don't"
217
            - attempt to match aggressively by trying all variations of the ISBNs in the imported record as a phrase in the ISBN fields of already cataloged records.  Note that this preference has no effect if UseQueryParser is on.
217
            - attempt to match aggressively by trying all variations of the ISBNs in the imported record as a phrase in the ISBN fields of already cataloged records.  Note that this preference has no effect if UseQueryParser is on.
218
- 
218
        -
219
            - Determines the MARC field/subfields
220
            - pref: AdditionalFieldsInZ3950ResultSearch
221
            - "are displayed in 'Additional fields' column in the result of a search Z3950 (use whitespace as delimiter ex: <code>082$ab</code> <code>090$ab</code>)"

Return to bug 12747