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

(-)a/C4/Biblio.pm (-3 / +70 lines)
Lines 115-120 BEGIN { Link Here
115
    # To link headings in a bib record
115
    # To link headings in a bib record
116
    # to authority records.
116
    # to authority records.
117
    push @EXPORT, qw(
117
    push @EXPORT, qw(
118
      &BiblioAutoLink
118
      &LinkBibHeadingsToAuthorities
119
      &LinkBibHeadingsToAuthorities
119
    );
120
    );
120
121
Lines 458-466 sub DelBiblio { Link Here
458
    return;
459
    return;
459
}
460
}
460
461
462
=head2 BiblioAutoLink
463
464
  my $headings_linked = BiblioAutoLink($record, $frameworkcode)
465
466
Automatically links headings in a bib record to authorities.
467
468
=cut
469
470
sub BiblioAutoLink {
471
    my $record = shift;
472
    my $frameworkcode = shift;
473
    my ($num_headings_changed, %results);
474
475
    my $linker_module = "C4::Linker::" . (C4::Context->preference("LinkerModule") || 'Default');
476
    eval {
477
        eval "require $linker_module";
478
    };
479
    if ($@){
480
        $linker_module = 'C4::Linker::Default';
481
        eval "require $linker_module";
482
    }
483
    if ($@) {
484
        return 0, 0;
485
    }
486
487
    my $linker = $linker_module->new();
488
    my ($headings_changed, undef) = LinkBibHeadingsToAuthorities($linker, $record);
489
    return $headings_changed;
490
}
491
461
=head2 LinkBibHeadingsToAuthorities
492
=head2 LinkBibHeadingsToAuthorities
462
493
463
  my $headings_linked = LinkBibHeadingsToAuthorities($marc);
494
  my $num_headings_changed, %results = LinkBibHeadingsToAuthorities($linker, $marc);
464
495
465
Links bib headings to authority records by checking
496
Links bib headings to authority records by checking
466
each authority-controlled field in the C<MARC::Record>
497
each authority-controlled field in the C<MARC::Record>
Lines 481-486 sub LinkBibHeadingsToAuthorities { Link Here
481
    my $linker = shift;
512
    my $linker = shift;
482
    my $bib = shift;
513
    my $bib = shift;
483
    my %results;
514
    my %results;
515
    require C4::AuthoritiesMarc;
484
516
485
    my $num_headings_changed = 0;
517
    my $num_headings_changed = 0;
486
    foreach my $field ( $bib->fields() ) {
518
    foreach my $field ( $bib->fields() ) {
Lines 504-515 sub LinkBibHeadingsToAuthorities { Link Here
504
            $field->add_subfields( '9', $authid );
536
            $field->add_subfields( '9', $authid );
505
            $num_headings_changed++;
537
            $num_headings_changed++;
506
        } else {
538
        } else {
507
            if ( defined $current_link && C4::Context->preference('LinkerKeepStale')) {
539
            if (defined $current_link && C4::Context->preference('LinkerKeepStale')) {
508
                $results{'fuzzy'}->{$heading->display_form()}++;
540
                $results{'fuzzy'}->{$heading->display_form()}++;
509
            } else {
541
            } elsif (C4::Context->preference('AutoCreateAuthorities')) {
542
                my $authtypedata=C4::AuthoritiesMarc::GetAuthType($heading->auth_type());
543
                my $marcrecordauth=MARC::Record->new();
544
                if (C4::Context->preference('marcflavour') eq 'MARC21') {
545
                    $marcrecordauth->leader('     nz  a22     o  4500');
546
                    SetMarcUnicodeFlag($marcrecordauth, 'MARC21');
547
                }
548
                my $authfield=MARC::Field->new($authtypedata->{auth_tag_to_report},'','',"a"=>"".$field->subfield('a'));
549
                map { $authfield->add_subfields($_->[0]=>$_->[1]) if ($_->[0]=~/[A-z]/ && $_->[0] ne "a" )}  $field->subfields();
550
                $marcrecordauth->insert_fields_ordered($authfield);
551
552
# bug 2317: ensure new authority knows it's using UTF-8; currently
553
# only need to do this for MARC21, as MARC::Record->as_xml_record() handles
554
# automatically for UNIMARC (by not transcoding)
555
# FIXME: AddAuthority() instead should simply explicitly require that the MARC::Record
556
# use UTF-8, but as of 2008-08-05, did not want to introduce that kind
557
# of change to a core API just before the 3.0 release.
558
559
                if (C4::Context->preference('marcflavour') eq 'MARC21') {
560
                    $marcrecordauth->insert_fields_ordered(MARC::Field->new('667','','','a'=>"Machine generated authority record."));
561
                    my $cite = $bib->author() . ", " .  $bib->title_proper() . ", " . $bib->publication_date() . " "; 
562
                    $cite =~ s/^[\s\,]*//;
563
                    $cite =~ s/[\s\,]*$//;
564
                    $cite = "Work cat.: (" . C4::Context->preference('MARCOrgCode') . ")". $bib->subfield('999','c') . ": " . $cite;
565
                    $marcrecordauth->insert_fields_ordered(MARC::Field->new('670','','','a'=>$cite));
566
                }
567
568
#          warn "AUTH RECORD ADDED : ".$marcrecordauth->as_formatted;
569
570
                $authid=C4::AuthoritiesMarc::AddAuthority($marcrecordauth,'',$heading->auth_type());
571
                $field->add_subfields( '9', $authid );
572
                $num_headings_changed++;
573
                $results{'added'}->{$heading->display_form()}++;
574
            } elsif (defined $current_link) {
510
                $field->delete_subfield( code => '9' );
575
                $field->delete_subfield( code => '9' );
511
                $num_headings_changed++;
576
                $num_headings_changed++;
512
                $results{'unlinked'}->{$heading->display_form()}++;
577
                $results{'unlinked'}->{$heading->display_form()}++;
578
            } else {
579
                $results{'unlinked'}->{$heading->display_form()}++;
513
            }
580
            }
514
        }
581
        }
515
582
(-)a/C4/Heading.pm (+13 lines)
Lines 84-89 sub new_from_bib_field { Link Here
84
    return $self;
84
    return $self;
85
}
85
}
86
86
87
=head2 auth_type
88
89
  my $auth_type = $heading->auth_type();
90
91
Return the auth_type of the heading.
92
93
=cut
94
95
sub auth_type {
96
    my $self = shift;
97
    return $self->{'auth_type'};
98
}
99
87
=head2 field
100
=head2 field
88
101
89
  my $field = $heading->field();
102
  my $field = $heading->field();
(-)a/C4/Search.pm (-101 lines)
Lines 68-76 This module provides searching functions for Koha's bibliographic databases Link Here
68
  &NZgetRecords
68
  &NZgetRecords
69
  &AddSearchHistory
69
  &AddSearchHistory
70
  &GetDistinctValues
70
  &GetDistinctValues
71
  &BiblioAddAuthorities
72
);
71
);
73
#FIXME: i had to add BiblioAddAuthorities here because in Biblios.pm it caused circular dependencies (C4::Search uses C4::Biblio, and BiblioAddAuthorities uses SimpleSearch from C4::Search)
74
72
75
# make all your functions, whether exported or not;
73
# make all your functions, whether exported or not;
76
74
Lines 2638-2742 sub z3950_search_args { Link Here
2638
    return $array;
2636
    return $array;
2639
}
2637
}
2640
2638
2641
=head2 BiblioAddAuthorities
2642
2643
( $countlinked, $countcreated ) = BiblioAddAuthorities($record, $frameworkcode);
2644
2645
this function finds the authorities linked to the biblio
2646
    * search in the authority DB for the same authid (in $9 of the biblio)
2647
    * search in the authority DB for the same 001 (in $3 of the biblio in UNIMARC)
2648
    * search in the authority DB for the same values (exactly) (in all subfields of the biblio)
2649
OR adds a new authority record
2650
2651
=over 2
2652
2653
=item C<input arg:>
2654
2655
    * $record is the MARC record in question (marc blob)
2656
    * $frameworkcode is the bibliographic framework to use (if it is "" it uses the default framework)
2657
2658
=item C<Output arg:>
2659
2660
    * $countlinked is the number of authorities records that are linked to this authority
2661
    * $countcreated
2662
2663
=item C<BUGS>
2664
    * I had to add this to Search.pm (instead of the logical Biblio.pm) because of a circular dependency (this sub uses SimpleSearch, and Search.pm uses Biblio.pm)
2665
2666
=back
2667
2668
=cut
2669
2670
2671
sub BiblioAddAuthorities{
2672
  my ( $record, $frameworkcode ) = @_;
2673
  my $dbh=C4::Context->dbh;
2674
  my $query=$dbh->prepare(qq|
2675
SELECT authtypecode,tagfield
2676
FROM marc_subfield_structure
2677
WHERE frameworkcode=?
2678
AND (authtypecode IS NOT NULL AND authtypecode<>\"\")|);
2679
# SELECT authtypecode,tagfield
2680
# FROM marc_subfield_structure
2681
# WHERE frameworkcode=?
2682
# AND (authtypecode IS NOT NULL OR authtypecode<>\"\")|);
2683
  $query->execute($frameworkcode);
2684
  my ($countcreated,$countlinked);
2685
  while (my $data=$query->fetchrow_hashref){
2686
    foreach my $field ($record->field($data->{tagfield})){
2687
      next if ($field->subfield('3')||$field->subfield('9'));
2688
      # No authorities id in the tag.
2689
      # Search if there is any authorities to link to.
2690
      my $query='at='.$data->{authtypecode}.' ';
2691
      map {$query.= ' and he,ext="'.$_->[1].'"' if ($_->[0]=~/[A-z]/)}  $field->subfields();
2692
      my ($error, $results, $total_hits)=SimpleSearch( $query, undef, undef, [ "authorityserver" ] );
2693
    # there is only 1 result
2694
          if ( $error ) {
2695
        warn "BIBLIOADDSAUTHORITIES: $error";
2696
            return (0,0) ;
2697
          }
2698
      if ( @{$results} == 1 ) {
2699
        my $marcrecord = MARC::File::USMARC::decode($results->[0]);
2700
        $field->add_subfields('9'=>$marcrecord->field('001')->data);
2701
        $countlinked++;
2702
      } elsif ( @{$results} > 1 ) {
2703
   #More than One result
2704
   #This can comes out of a lack of a subfield.
2705
#         my $marcrecord = MARC::File::USMARC::decode($results->[0]);
2706
#         $record->field($data->{tagfield})->add_subfields('9'=>$marcrecord->field('001')->data);
2707
  $countlinked++;
2708
      } else {
2709
  #There are no results, build authority record, add it to Authorities, get authid and add it to 9
2710
  ###NOTICE : This is only valid if a subfield is linked to one and only one authtypecode
2711
  ###NOTICE : This can be a problem. We should also look into other types and rejected forms.
2712
         my $authtypedata=C4::AuthoritiesMarc::GetAuthType($data->{authtypecode});
2713
         next unless $authtypedata;
2714
         my $marcrecordauth=MARC::Record->new();
2715
         my $authfield=MARC::Field->new($authtypedata->{auth_tag_to_report},'','',"a"=>"".$field->subfield('a'));
2716
         map { $authfield->add_subfields($_->[0]=>$_->[1]) if ($_->[0]=~/[A-z]/ && $_->[0] ne "a" )}  $field->subfields();
2717
         $marcrecordauth->insert_fields_ordered($authfield);
2718
2719
         # bug 2317: ensure new authority knows it's using UTF-8; currently
2720
         # only need to do this for MARC21, as MARC::Record->as_xml_record() handles
2721
         # automatically for UNIMARC (by not transcoding)
2722
         # FIXME: AddAuthority() instead should simply explicitly require that the MARC::Record
2723
         # use UTF-8, but as of 2008-08-05, did not want to introduce that kind
2724
         # of change to a core API just before the 3.0 release.
2725
         if (C4::Context->preference('marcflavour') eq 'MARC21') {
2726
            SetMarcUnicodeFlag($marcrecordauth, 'MARC21');
2727
         }
2728
2729
#          warn "AUTH RECORD ADDED : ".$marcrecordauth->as_formatted;
2730
2731
         my $authid=AddAuthority($marcrecordauth,'',$data->{authtypecode});
2732
         $countcreated++;
2733
         $field->add_subfields('9'=>$authid);
2734
      }
2735
    }
2736
  }
2737
  return ($countlinked,$countcreated);
2738
}
2739
2740
=head2 GetDistinctValues($field);
2639
=head2 GetDistinctValues($field);
2741
2640
2742
C<$field> is a reference to the fields array
2641
C<$field> is a reference to the fields array
(-)a/acqui/addorderiso2709.pl (-2 / +2 lines)
Lines 33-39 use C4::Input; Link Here
33
use C4::Output;
33
use C4::Output;
34
use C4::ImportBatch;
34
use C4::ImportBatch;
35
use C4::Matcher;
35
use C4::Matcher;
36
use C4::Search qw/FindDuplicate BiblioAddAuthorities/;
36
use C4::Search qw/FindDuplicate/;
37
use C4::Acquisition;
37
use C4::Acquisition;
38
use C4::Biblio;
38
use C4::Biblio;
39
use C4::Items;
39
use C4::Items;
Lines 183-189 if ($op eq ""){ Link Here
183
            SetImportRecordStatus( $biblio->{'import_record_id'}, 'imported' );
183
            SetImportRecordStatus( $biblio->{'import_record_id'}, 'imported' );
184
            # 2nd add authorities if applicable
184
            # 2nd add authorities if applicable
185
            if (C4::Context->preference("BiblioAddsAuthorities")){
185
            if (C4::Context->preference("BiblioAddsAuthorities")){
186
                my ($countlinked,$countcreated)=BiblioAddAuthorities($marcrecord, $cgiparams->{'frameworkcode'});
186
                my $headings_linked =BiblioAutoLink($marcrecord, $cgiparams->{'frameworkcode'});
187
            }
187
            }
188
        } else {
188
        } else {
189
            SetImportRecordStatus( $biblio->{'import_record_id'}, 'imported' );
189
            SetImportRecordStatus( $biblio->{'import_record_id'}, 'imported' );
(-)a/acqui/neworderempty.pl (-2 / +2 lines)
Lines 86-92 use C4::Input; Link Here
86
use C4::Koha;
86
use C4::Koha;
87
use C4::Branch;			# GetBranches
87
use C4::Branch;			# GetBranches
88
use C4::Members;
88
use C4::Members;
89
use C4::Search qw/FindDuplicate BiblioAddAuthorities/;
89
use C4::Search qw/FindDuplicate/;
90
90
91
#needed for z3950 import:
91
#needed for z3950 import:
92
use C4::ImportBatch qw/GetImportRecordMarc SetImportRecordStatus/;
92
use C4::ImportBatch qw/GetImportRecordMarc SetImportRecordStatus/;
Lines 148-154 if ( $ordernumber eq '' and defined $params->{'breedingid'}){ Link Here
148
    }
148
    }
149
    #from this point: add a new record
149
    #from this point: add a new record
150
        if (C4::Context->preference("BiblioAddsAuthorities")){
150
        if (C4::Context->preference("BiblioAddsAuthorities")){
151
            my ($countlinked,$countcreated)=BiblioAddAuthorities($marcrecord, $params->{'frameworkcode'});
151
            my $headings_linked=BiblioAutoLink($marcrecord, $params->{'frameworkcode'});
152
        }
152
        }
153
        my $bibitemnum;
153
        my $bibitemnum;
154
        $params->{'frameworkcode'} or $params->{'frameworkcode'} = "";
154
        $params->{'frameworkcode'} or $params->{'frameworkcode'} = "";
(-)a/cataloguing/addbiblio.pl (-90 / +1 lines)
Lines 736-830 sub build_tabs { Link Here
736
    $template->param( BIG_LOOP => \@BIG_LOOP );
736
    $template->param( BIG_LOOP => \@BIG_LOOP );
737
}
737
}
738
738
739
#
740
# sub that tries to find authorities linked to the biblio
741
# the sub :
742
#   - search in the authority DB for the same authid (in $9 of the biblio)
743
#   - search in the authority DB for the same 001 (in $3 of the biblio in UNIMARC)
744
#   - search in the authority DB for the same values (exactly) (in all subfields of the biblio)
745
# if the authority is found, the biblio is modified accordingly to be connected to the authority.
746
# if the authority is not found, it's added, and the biblio is then modified to be connected to the authority.
747
#
748
749
sub BiblioAddAuthorities{
750
  my ( $record, $frameworkcode ) = @_;
751
  my $dbh=C4::Context->dbh;
752
  my $query=$dbh->prepare(qq|
753
SELECT authtypecode,tagfield
754
FROM marc_subfield_structure 
755
WHERE frameworkcode=? 
756
AND (authtypecode IS NOT NULL AND authtypecode<>\"\")|);
757
# SELECT authtypecode,tagfield
758
# FROM marc_subfield_structure 
759
# WHERE frameworkcode=? 
760
# AND (authtypecode IS NOT NULL OR authtypecode<>\"\")|);
761
  $query->execute($frameworkcode);
762
  my ($countcreated,$countlinked);
763
  while (my $data=$query->fetchrow_hashref){
764
    foreach my $field ($record->field($data->{tagfield})){
765
      next if ($field->subfield('3') || $field->subfield('9'));
766
      # No authorities id in the tag.
767
      # Search if there is any authorities to link to.
768
      my $query='at='.$data->{authtypecode}.' ';
769
      map {$query.= ' and he,ext="'.$_->[1].'"' if ($_->[0]=~/[A-z]/)}  $field->subfields();
770
      my ($error, $results, $total_hits)=SimpleSearch( $query, undef, undef, [ "authorityserver" ] );
771
    # there is only 1 result 
772
	  if ( $error ) {
773
        warn "BIBLIOADDSAUTHORITIES: $error";
774
	    return (0,0) ;
775
	  }
776
      if ( @{$results} == 1) {
777
        my $marcrecord = MARC::File::USMARC::decode($results->[0]);
778
        $field->add_subfields('9'=>$marcrecord->field('001')->data);
779
        $countlinked++;
780
      } elsif (@{$results} > 1) {
781
   #More than One result 
782
   #This can comes out of a lack of a subfield.
783
#         my $marcrecord = MARC::File::USMARC::decode($results->[0]);
784
#         $record->field($data->{tagfield})->add_subfields('9'=>$marcrecord->field('001')->data);
785
        $countlinked++;
786
      } else {
787
  #There are no results, build authority record, add it to Authorities, get authid and add it to 9
788
  ###NOTICE : This is only valid if a subfield is linked to one and only one authtypecode     
789
  ###NOTICE : This can be a problem. We should also look into other types and rejected forms.
790
         my $authtypedata=GetAuthType($data->{authtypecode});
791
         next unless $authtypedata;
792
         my $marcrecordauth=MARC::Record->new();
793
		if (C4::Context->preference('marcflavour') eq 'MARC21') {
794
			$marcrecordauth->leader('     nz  a22     o  4500');
795
			SetMarcUnicodeFlag($marcrecordauth, 'MARC21');
796
			}
797
         my $authfield=MARC::Field->new($authtypedata->{auth_tag_to_report},'','',"a"=>"".$field->subfield('a'));
798
         map { $authfield->add_subfields($_->[0]=>$_->[1]) if ($_->[0]=~/[A-z]/ && $_->[0] ne "a" )}  $field->subfields();
799
         $marcrecordauth->insert_fields_ordered($authfield);
800
801
         # bug 2317: ensure new authority knows it's using UTF-8; currently
802
         # only need to do this for MARC21, as MARC::Record->as_xml_record() handles
803
         # automatically for UNIMARC (by not transcoding)
804
         # FIXME: AddAuthority() instead should simply explicitly require that the MARC::Record
805
         # use UTF-8, but as of 2008-08-05, did not want to introduce that kind
806
         # of change to a core API just before the 3.0 release.
807
808
				if (C4::Context->preference('marcflavour') eq 'MARC21') {
809
					$marcrecordauth->insert_fields_ordered(MARC::Field->new('667','','','a'=>"Machine generated authority record."));
810
					my $cite = $record->author() . ", " .  $record->title_proper() . ", " . $record->publication_date() . " "; 
811
					$cite =~ s/^[\s\,]*//;
812
					$cite =~ s/[\s\,]*$//;
813
					$cite = "Work cat.: (" . C4::Context->preference('MARCOrgCode') . ")". $record->subfield('999','c') . ": " . $cite;
814
					$marcrecordauth->insert_fields_ordered(MARC::Field->new('670','','','a'=>$cite));
815
				}
816
817
#          warn "AUTH RECORD ADDED : ".$marcrecordauth->as_formatted;
818
819
         my $authid=AddAuthority($marcrecordauth,'',$data->{authtypecode});
820
         $countcreated++;
821
         $field->add_subfields('9'=>$authid);
822
      }
823
    }  
824
  }
825
  return ($countlinked,$countcreated);
826
}
827
828
# ========================
739
# ========================
829
#          MAIN
740
#          MAIN
830
#=========================
741
#=========================
Lines 957-963 if ( $op eq "addbiblio" ) { Link Here
957
        my $oldbibnum;
868
        my $oldbibnum;
958
        my $oldbibitemnum;
869
        my $oldbibitemnum;
959
        if (C4::Context->preference("BiblioAddsAuthorities")){
870
        if (C4::Context->preference("BiblioAddsAuthorities")){
960
          my ($countlinked,$countcreated)=BiblioAddAuthorities($record,$frameworkcode);
871
          my ($countlinked,$countcreated)=BiblioAutoLink($record,$frameworkcode);
961
        } 
872
        } 
962
        if ( $is_a_modif ) {
873
        if ( $is_a_modif ) {
963
            ModBiblioframework( $biblionumber, $frameworkcode ); 
874
            ModBiblioframework( $biblionumber, $frameworkcode ); 
(-)a/installer/data/mysql/atomicupdate/bug_7284_authority_linking_pt1 (+1 lines)
Lines 6-9 my $dbh=C4::Context->dbh; Link Here
6
$dbh->do("INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('LinkerModule','Default','Chooses which linker module to use (see documentation).','Default|FirstMatchLastMatch','Choice');");
6
$dbh->do("INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('LinkerModule','Default','Chooses which linker module to use (see documentation).','Default|FirstMatchLastMatch','Choice');");
7
$dbh->do("INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('LinkerRelink',1,'If ON the authority linker will relink headings that have previously been linked every time it runs.',NULL,'YesNo');");
7
$dbh->do("INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('LinkerRelink',1,'If ON the authority linker will relink headings that have previously been linked every time it runs.',NULL,'YesNo');");
8
$dbh->do("INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('LinkerKeepStale',0,'If ON the authority linker will keep existing authority links for headings where it is unable to find a match.',NULL,'YesNo');");
8
$dbh->do("INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('LinkerKeepStale',0,'If ON the authority linker will keep existing authority links for headings where it is unable to find a match.',NULL,'YesNo');");
9
$dbh->do("INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('AutoCreateAuthorities',0,'Automatically create authorities that do not exist when cataloging records.',NULL,'YesNo');");
9
print "Upgrade done (Configured bug 7284, improved authority matching)\n";
10
print "Upgrade done (Configured bug 7284, improved authority matching)\n";
(-)a/installer/data/mysql/sysprefs.sql (+1 lines)
Lines 330-335 INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES Link Here
330
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('EasyAnalyticalRecords','0','If on, display in the catalogue screens tools to easily setup analytical record relationships','','YesNo');
330
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('EasyAnalyticalRecords','0','If on, display in the catalogue screens tools to easily setup analytical record relationships','','YesNo');
331
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('OpacShowRecentComments',0,'If ON a link to recent comments will appear in the OPAC masthead',NULL,'YesNo');
331
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('OpacShowRecentComments',0,'If ON a link to recent comments will appear in the OPAC masthead',NULL,'YesNo');
332
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('CircAutoPrintQuickSlip', '1', 'Choose what should happen when an empty barcode field is submitted in circulation: Display a print quick slip window or Clear the screen.',NULL,'YesNo');
332
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('CircAutoPrintQuickSlip', '1', 'Choose what should happen when an empty barcode field is submitted in circulation: Display a print quick slip window or Clear the screen.',NULL,'YesNo');
333
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('AutoCreateAuthorities',0,'Automatically create authorities that do not exist when cataloging records.',NULL,'YesNo');
333
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('LinkerModule','Default','Chooses which linker module to use (see documentation).','Default|FirstMatch|LastMatch','Choice');
334
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('LinkerModule','Default','Chooses which linker module to use (see documentation).','Default|FirstMatch|LastMatch','Choice');
334
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('LinkerRelink',1,'If ON the authority linker will relink headings that have previously been linked every time it runs.',NULL,'YesNo');
335
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('LinkerRelink',1,'If ON the authority linker will relink headings that have previously been linked every time it runs.',NULL,'YesNo');
335
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('LinkerKeepStale',0,'If ON the authority linker will keep existing authority links for headings where it is unable to find a match.',NULL,'YesNo');
336
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('LinkerKeepStale',0,'If ON the authority linker will keep existing authority links for headings where it is unable to find a match.',NULL,'YesNo');
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/authorities.pref (-1 / +8 lines)
Lines 9-14 Authorities: Link Here
9
                  no: "don't allow"
9
                  no: "don't allow"
10
            - them to automatically create new authority records if needed, rather than having to reference existing authorities.
10
            - them to automatically create new authority records if needed, rather than having to reference existing authorities.
11
        -
11
        -
12
            - When editing records,
13
            - pref: AutoCreateAuthorities
14
              default: yes
15
              choices:
16
                  yes: generate
17
                  no: "do not generate"
18
            - authority records that are missing (BiblioAddsAuthorities must be set to "allow" for this to have any effect).
19
        -
12
            - pref: dontmerge
20
            - pref: dontmerge
13
              default: yes
21
              default: yes
14
              choices:
22
              choices:
15
- 

Return to bug 7284