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

(-)a/C4/Biblio.pm (-2 / +2 lines)
Lines 282-288 sub AddBiblio { Link Here
282
            # update MARC subfield that stores biblioitems.cn_sort
282
            # update MARC subfield that stores biblioitems.cn_sort
283
            _koha_marc_update_biblioitem_cn_sort( $record, $olddata, $frameworkcode );
283
            _koha_marc_update_biblioitem_cn_sort( $record, $olddata, $frameworkcode );
284
284
285
            if (C4::Context->preference('BiblioAddsAuthorities')) {
285
            if (C4::Context->preference('AutoLinkBiblios')) {
286
                BiblioAutoLink( $record, $frameworkcode );
286
                BiblioAutoLink( $record, $frameworkcode );
287
            }
287
            }
288
288
Lines 366-372 sub ModBiblio { Link Here
366
        logaction( "CATALOGUING", "MODIFY", $biblionumber, "biblio BEFORE=>" . $biblio->metadata->record->as_formatted );
366
        logaction( "CATALOGUING", "MODIFY", $biblionumber, "biblio BEFORE=>" . $biblio->metadata->record->as_formatted );
367
    }
367
    }
368
368
369
    if ( !$options->{disable_autolink} && C4::Context->preference('BiblioAddsAuthorities') ) {
369
    if ( !$options->{disable_autolink} && C4::Context->preference('AutoLinkBiblios') ) {
370
        BiblioAutoLink( $record, $frameworkcode );
370
        BiblioAutoLink( $record, $frameworkcode );
371
    }
371
    }
372
372
(-)a/C4/UsageStats.pm (-1 / +2 lines)
Lines 152-158 sub _shared_preferences { Link Here
152
        Persona
152
        Persona
153
        AuthDisplayHierarchy
153
        AuthDisplayHierarchy
154
        AutoCreateAuthorities
154
        AutoCreateAuthorities
155
        BiblioAddsAuthorities
155
        AutoLinkBiblios
156
        AllowManualAuthorityEditing
156
        AuthorityMergeLimit
157
        AuthorityMergeLimit
157
        AuthorityMergeMode
158
        AuthorityMergeMode
158
        UseAuthoritiesForTracings
159
        UseAuthoritiesForTracings
(-)a/about.pl (-4 / +4 lines)
Lines 172-179 if ($prefStatisticsFields) { Link Here
172
}
172
}
173
173
174
my $prefAutoCreateAuthorities = C4::Context->preference('AutoCreateAuthorities');
174
my $prefAutoCreateAuthorities = C4::Context->preference('AutoCreateAuthorities');
175
my $prefBiblioAddsAuthorities = C4::Context->preference('BiblioAddsAuthorities');
175
my $prefAllowManualAuthorityEditing = C4::Context->preference('AllowManualAuthorityEditing');
176
my $warnPrefBiblioAddsAuthorities = ( $prefAutoCreateAuthorities && ( !$prefBiblioAddsAuthorities) );
176
my $warnPrefAllowManualAuthorityEditing = ( $prefAutoCreateAuthorities && ( !$prefAllowManualAuthorityEditing) );
177
177
178
my $prefEasyAnalyticalRecords  = C4::Context->preference('EasyAnalyticalRecords');
178
my $prefEasyAnalyticalRecords  = C4::Context->preference('EasyAnalyticalRecords');
179
my $prefUseControlNumber  = C4::Context->preference('UseControlNumber');
179
my $prefUseControlNumber  = C4::Context->preference('UseControlNumber');
Lines 632-640 $template->param( Link Here
632
    mysqlVersion  => $versions{'mysqlVersion'},
632
    mysqlVersion  => $versions{'mysqlVersion'},
633
    apacheVersion => $versions{'apacheVersion'},
633
    apacheVersion => $versions{'apacheVersion'},
634
    zebraVersion  => $zebraVersion,
634
    zebraVersion  => $zebraVersion,
635
    prefBiblioAddsAuthorities => $prefBiblioAddsAuthorities,
635
    prefAllowManualAuthorityEditing => $prefAllowManualAuthorityEditing,
636
    prefAutoCreateAuthorities => $prefAutoCreateAuthorities,
636
    prefAutoCreateAuthorities => $prefAutoCreateAuthorities,
637
    warnPrefBiblioAddsAuthorities => $warnPrefBiblioAddsAuthorities,
637
    warnPrefAllowManualAuthorityEditing => $warnPrefAllowManualAuthorityEditing,
638
    warnPrefEasyAnalyticalRecords  => $warnPrefEasyAnalyticalRecords,
638
    warnPrefEasyAnalyticalRecords  => $warnPrefEasyAnalyticalRecords,
639
    warnPrefAnonymousPatronOPACPrivacy        => $warnPrefAnonymousPatronOPACPrivacy,
639
    warnPrefAnonymousPatronOPACPrivacy        => $warnPrefAnonymousPatronOPACPrivacy,
640
    warnPrefAnonymousPatronAnonSuggestions    => $warnPrefAnonymousPatronAnonSuggestions,
640
    warnPrefAnonymousPatronAnonSuggestions    => $warnPrefAnonymousPatronAnonSuggestions,
(-)a/cataloguing/addbiblio.pl (-1 / +1 lines)
Lines 376-382 sub create_input { Link Here
376
    }
376
    }
377
    elsif ( $tagslib->{$tag}->{$subfield}->{authtypecode} ) {
377
    elsif ( $tagslib->{$tag}->{$subfield}->{authtypecode} ) {
378
        # when authorities auto-creation is allowed, do not set readonly
378
        # when authorities auto-creation is allowed, do not set readonly
379
        my $is_readonly = !C4::Context->preference("BiblioAddsAuthorities");
379
        my $is_readonly = !C4::Context->preference("AllowManualAuthorityEditing");
380
380
381
        $subfield_data{marc_value} = {
381
        $subfield_data{marc_value} = {
382
            type      => 'text',
382
            type      => 'text',
(-)a/installer/data/mysql/mandatory/sysprefs.sql (-1 / +2 lines)
Lines 31-36 INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` Link Here
31
('AllowCheckoutNotes', '0', NULL, 'Allow patrons to submit notes about checked out items.','YesNo'),
31
('AllowCheckoutNotes', '0', NULL, 'Allow patrons to submit notes about checked out items.','YesNo'),
32
('AllowItemsOnHoldCheckoutSIP','0','','Do not generate RESERVED warning when checking out items reserved to someone else via SIP. This allows self checkouts for those items.','YesNo'),
32
('AllowItemsOnHoldCheckoutSIP','0','','Do not generate RESERVED warning when checking out items reserved to someone else via SIP. This allows self checkouts for those items.','YesNo'),
33
('AllowItemsOnHoldCheckoutSCO','0','','Do not generate RESERVE_WAITING and RESERVED warning in the SCO module when checking out items reserved to someone else. This allows self checkouts for those items.','YesNo'),
33
('AllowItemsOnHoldCheckoutSCO','0','','Do not generate RESERVE_WAITING and RESERVED warning in the SCO module when checking out items reserved to someone else. This allows self checkouts for those items.','YesNo'),
34
('AllowManualAuthorityEditing','0',NULL,'Allow manual entry in controlled fields during cataloging.','YesNo'),
34
('AllowMultipleCovers','0','1','Allow multiple cover images to be attached to each bibliographic record.','YesNo'),
35
('AllowMultipleCovers','0','1','Allow multiple cover images to be attached to each bibliographic record.','YesNo'),
35
('AllowMultipleIssuesOnABiblio',1,'Allow/Don\'t allow patrons to check out multiple items from one biblio','','YesNo'),
36
('AllowMultipleIssuesOnABiblio',1,'Allow/Don\'t allow patrons to check out multiple items from one biblio','','YesNo'),
36
('AllowNotForLoanOverride','0','','If ON, Koha will allow the librarian to loan a not for loan item.','YesNo'),
37
('AllowNotForLoanOverride','0','','If ON, Koha will allow the librarian to loan a not for loan item.','YesNo'),
Lines 80-85 INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` Link Here
80
('AutoShareWithMana','subscription','','defines datas automatically shared with mana','multiple'),
81
('AutoShareWithMana','subscription','','defines datas automatically shared with mana','multiple'),
81
('AutoLocation','0',NULL,'If ON, IP authentication is enabled, blocking access to the staff interface from unauthorized IP addresses','YesNo'),
82
('AutoLocation','0',NULL,'If ON, IP authentication is enabled, blocking access to the staff interface from unauthorized IP addresses','YesNo'),
82
('AutomaticItemReturn','1',NULL,'If ON, Koha will automatically set up a transfer of this item to its homebranch','YesNo'),
83
('AutomaticItemReturn','1',NULL,'If ON, Koha will automatically set up a transfer of this item to its homebranch','YesNo'),
84
('AutoLinkBiblios','0',NULL,'If enabled, link biblio to authorities on creation and edit','YesNo'),
83
('autoMemberNum','0','','If ON, patron number is auto-calculated','YesNo'),
85
('autoMemberNum','0','','If ON, patron number is auto-calculated','YesNo'),
84
('AutoRemoveOverduesRestrictions','0',NULL,'Defines whether an OVERDUES debarment should be lifted automatically if all overdue items are returned by the patron.','YesNo'),
86
('AutoRemoveOverduesRestrictions','0',NULL,'Defines whether an OVERDUES debarment should be lifted automatically if all overdue items are returned by the patron.','YesNo'),
85
('AutoRenewalNotices','cron','cron|preferences|never','How should Koha determine whether to end autorenewal notices','Choice'),
87
('AutoRenewalNotices','cron','cron|preferences|never','How should Koha determine whether to end autorenewal notices','Choice'),
Lines 100-106 INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` Link Here
100
('BasketConfirmations','1','always ask for confirmation.|do not ask for confirmation.','When closing or reopening a basket,','Choice'),
102
('BasketConfirmations','1','always ask for confirmation.|do not ask for confirmation.','When closing or reopening a basket,','Choice'),
101
('BatchCheckouts','0','','Enable or disable batch checkouts','YesNo'),
103
('BatchCheckouts','0','','Enable or disable batch checkouts','YesNo'),
102
('BatchCheckoutsValidCategories','',NULL,'Patron categories allowed to checkout in a batch','Free'),
104
('BatchCheckoutsValidCategories','',NULL,'Patron categories allowed to checkout in a batch','Free'),
103
('BiblioAddsAuthorities','0',NULL,'If ON, adding a new biblio will check for an existing authority record and create one on the fly if one doesn\'t exist','YesNo'),
104
('BiblioDefaultView','normal','normal|marc|isbd','Choose the default detail view in the catalog; choose between normal, marc or isbd','Choice'),
105
('BiblioDefaultView','normal','normal|marc|isbd','Choose the default detail view in the catalog; choose between normal, marc or isbd','Choice'),
105
('BiblioItemtypeInfo','0','0','Control which itemtype info displays for biblio level itemtypes','YesNo'),
106
('BiblioItemtypeInfo','0','0','Control which itemtype info displays for biblio level itemtypes','YesNo'),
106
('BibtexExportAdditionalFields',  '', NULL ,  'Define additional BibTex tags to export from MARC records in YAML format as an associative array with either a marc tag/subfield combination as the value, or a list of tag/subfield combinations.',  'textarea'),
107
('BibtexExportAdditionalFields',  '', NULL ,  'Define additional BibTex tags to export from MARC records in YAML format as an associative array with either a marc tag/subfield combination as the value, or a list of tag/subfield combinations.',  'textarea'),
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/about.tt (-4 / +4 lines)
Lines 216-222 Link Here
216
        </div>
216
        </div>
217
217
218
        <div role="tabpanel" class="tab-pane" id="sysinfo">
218
        <div role="tabpanel" class="tab-pane" id="sysinfo">
219
    [% IF warnPrefBiblioAddsAuthorities || warnPrefEasyAnalyticalRecords || warnPrefAnonymousPatronOPACPrivacy || warnPrefAnonymousPatronAnonSuggestions || warnPrefAnonymousPatronOPACPrivacy_PatronDoesNotExist || warnPrefAnonymousPatronAnonSuggestions_PatronDoesNotExist || warnPrefKohaAdminEmailAddress || warnPrefOpacHiddenItems || invalid_yesno.count || warnNoActiveCurrency || warnIsRootUser || xml_config_warnings.size || AutoSelfCheckPatronDoesNotHaveSelfCheckPerm || AutoSelfCheckPatronHasTooManyPerm || warnStatisticsFieldsError || warnNoTemplateCaching || warnILLConfiguration || has_ai_issues || oauth2_missing_deps || bad_yaml_prefs || warnRelationships || log4perl_errors || config_bcrypt_settings_no_set || warnHiddenBiblionumbers.size || warnConnectBroker || elasticsearch_has_missing %]
219
    [% IF warnAllowManualAuthorityEditing || warnPrefEasyAnalyticalRecords || warnPrefAnonymousPatronOPACPrivacy || warnPrefAnonymousPatronAnonSuggestions || warnPrefAnonymousPatronOPACPrivacy_PatronDoesNotExist || warnPrefAnonymousPatronAnonSuggestions_PatronDoesNotExist || warnPrefKohaAdminEmailAddress || warnPrefOpacHiddenItems || invalid_yesno.count || warnNoActiveCurrency || warnIsRootUser || xml_config_warnings.size || AutoSelfCheckPatronDoesNotHaveSelfCheckPerm || AutoSelfCheckPatronHasTooManyPerm || warnStatisticsFieldsError || warnNoTemplateCaching || warnILLConfiguration || has_ai_issues || oauth2_missing_deps || bad_yaml_prefs || warnRelationships || log4perl_errors || config_bcrypt_settings_no_set || warnHiddenBiblionumbers.size || warnConnectBroker || elasticsearch_has_missing %]
220
        [% IF (warnIsRootUser) %]
220
        [% IF (warnIsRootUser) %]
221
            <h2>Warning regarding current user</h2>
221
            <h2>Warning regarding current user</h2>
222
            <p>You are logged in as the database administrative user. This is not recommended because some parts of Koha will not function as expected when using this account.</p>
222
            <p>You are logged in as the database administrative user. This is not recommended because some parts of Koha will not function as expected when using this account.</p>
Lines 300-311 Link Here
300
            Contact your system administrator.
300
            Contact your system administrator.
301
        [% END %]
301
        [% END %]
302
302
303
        [% IF warnPrefBiblioAddsAuthorities || warnPrefEasyAnalyticalRecords || warnPrefAnonymousPatronOPACPrivacy || warnPrefAnonymousPatronAnonSuggestions || warnPrefAnonymousPatronOPACPrivacy_PatronDoesNotExist || warnPrefAnonymousPatronAnonSuggestions_PatronDoesNotExist || warnPrefKohaAdminEmailAddress || warnPrefOpacHiddenItems || invalid_yesno.count || warnNoActiveCurrency || AutoSelfCheckPatronDoesNotHaveSelfCheckPerm || AutoSelfCheckPatronHasTooManyPerm || warnStatisticsFieldsError || warnNoTemplateCaching || warnILLConfiguration || warnXSLT || oauth2_missing_deps || bad_yaml_prefs || warnIssuingRules || config_bcrypt_settings_no_set || warnHiddenBiblionumbers.size %]
303
        [% IF warnPrefAllowManualAuthorityEditing || warnPrefEasyAnalyticalRecords || warnPrefAnonymousPatronOPACPrivacy || warnPrefAnonymousPatronAnonSuggestions || warnPrefAnonymousPatronOPACPrivacy_PatronDoesNotExist || warnPrefAnonymousPatronAnonSuggestions_PatronDoesNotExist || warnPrefKohaAdminEmailAddress || warnPrefOpacHiddenItems || invalid_yesno.count || warnNoActiveCurrency || AutoSelfCheckPatronDoesNotHaveSelfCheckPerm || AutoSelfCheckPatronHasTooManyPerm || warnStatisticsFieldsError || warnNoTemplateCaching || warnILLConfiguration || warnXSLT || oauth2_missing_deps || bad_yaml_prefs || warnIssuingRules || config_bcrypt_settings_no_set || warnHiddenBiblionumbers.size %]
304
            <h2>Warnings regarding the system configuration</h2>
304
            <h2>Warnings regarding the system configuration</h2>
305
            <table>
305
            <table>
306
                <caption>Preferences and parameters</caption>
306
                <caption>Preferences and parameters</caption>
307
                [% IF (warnPrefBiblioAddsAuthorities) %]
307
                [% IF (warnPrefAllowManualAuthorityEditing) %]
308
                <tr><th scope="row"><strong>Warning</strong> </th><td>System preference 'AutoCreateAuthorities' set, but needs 'BiblioAddsAuthorities' set as well.</td></tr>
308
                <tr><th scope="row"><strong>Warning</strong> </th><td>System preference 'AutoCreateAuthorities' set, but needs 'AllowManualAuthorityEditing' set as well. Otherwise catalogers can add headings that will not be linked to authorities.</td></tr>
309
                [% END %]
309
                [% END %]
310
                [% IF (warnPrefEasyAnalyticalRecords) %]
310
                [% IF (warnPrefEasyAnalyticalRecords) %]
311
                <tr><th scope="row"><strong>Warning</strong> </th><td>System preference 'EasyAnalyticalRecords' set, but UseControlNumber preference is set to 'Use'. Set it to 'Don't use' or else the 'Show analytics' links in the staff interface and the OPAC will be broken.</td></tr>
311
                <tr><th scope="row"><strong>Warning</strong> </th><td>System preference 'EasyAnalyticalRecords' set, but UseControlNumber preference is set to 'Use'. Set it to 'Don't use' or else the 'Show analytics' links in the staff interface and the OPAC will be broken.</td></tr>
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/authorities.pref (-6 / +13 lines)
Lines 16-27 Authorities: Link Here
16
              type: textarea
16
              type: textarea
17
        -
17
        -
18
            - When editing records,
18
            - When editing records,
19
            - pref: BiblioAddsAuthorities
19
            - pref: AllowManualAuthorityEditing
20
              default: no
20
              default: no
21
              choices:
21
              choices:
22
                  1: allow
22
                  1: allow
23
                  0: "don't allow"
23
                  0: "don't allow"
24
            - them to automatically create new authority records if needed, rather than having to reference existing authorities.
24
            - catalogers to manually create new headings if needed, rather than having to reference existing authorities.
25
        -
25
        -
26
            - When editing records,
26
            - When editing records,
27
            - pref: AutoCreateAuthorities
27
            - pref: AutoCreateAuthorities
Lines 29-35 Authorities: Link Here
29
              choices:
29
              choices:
30
                  1: generate
30
                  1: generate
31
                  0: "don't generate"
31
                  0: "don't generate"
32
            - authority records that are missing (<a href="/cgi-bin/koha/admin/preferences.pl?op=search&searchfield=BiblioAddsAuthorities">BiblioAddsAuthorities</a> must be set to "allow" for this to have any effect).
32
            - authority records that are missing (<a href="/cgi-bin/koha/admin/preferences.pl?op=search&searchfield=AllowManualAuthorityEditing">AllowManualAuthorityEditing</a> must be set to "allow" for this to have any effect).
33
        -
33
        -
34
            - When modifying an authority record, do not update attached bibliographic records if the number exceeds
34
            - When modifying an authority record, do not update attached bibliographic records if the number exceeds
35
            - pref: AuthorityMergeLimit
35
            - pref: AuthorityMergeLimit
Lines 64-76 Authorities: Link Here
64
                  "strict": strict
64
                  "strict": strict
65
            - mode. In strict mode subfields that are not found in the authority record, are deleted. Loose mode will keep them. Loose mode is the historical behavior and still the default.
65
            - mode. In strict mode subfields that are not found in the authority record, are deleted. Loose mode will keep them. Loose mode is the historical behavior and still the default.
66
        -
66
        -
67
            - "Use the following text as default value for the 667$a field of MARC21 authority records (requires <a href='/cgi-bin/koha/admin/preferences.pl?op=search&searchfield=BiblioAddsAuthorities'>BiblioAddsAuthorities</a> and <a href='/cgi-bin/koha/admin/preferences.pl?op=search&searchfield=AutoCreateAuthorities'>AutoCreateAuthorities</a>):"
67
            - "Use the following text as default value for the 667$a field of MARC21 authority records (requires <a href='/cgi-bin/koha/admin/preferences.pl?op=search&searchfield=AllowManualAuthorityEditing'>AllowManualAuthorityEditing</a> and <a href='/cgi-bin/koha/admin/preferences.pl?op=search&searchfield=AutoCreateAuthorities'>AutoCreateAuthorities</a>):"
68
            - pref: GenerateAuthorityField667
68
            - pref: GenerateAuthorityField667
69
              default: "Machine generated authority record"
69
              default: "Machine generated authority record"
70
              type: textarea
70
              type: textarea
71
              class: code
71
              class: code
72
        -
72
        -
73
            - "Use the following text as default value for the 670$a field of MARC21 authority records (requires <a href='/cgi-bin/koha/admin/preferences.pl?op=search&searchfield=BiblioAddsAuthorities'>BiblioAddsAuthorities</a> and <a href='/cgi-bin/koha/admin/preferences.pl?op=search&searchfield=AutoCreateAuthorities'>AutoCreateAuthorities</a>):"
73
            - "Use the following text as default value for the 670$a field of MARC21 authority records (requires <a href='/cgi-bin/koha/admin/preferences.pl?op=search&searchfield=AllowManualAuthorityEditing'>AllowManualAuthorityEditing</a> and <a href='/cgi-bin/koha/admin/preferences.pl?op=search&searchfield=AutoCreateAuthorities'>AutoCreateAuthorities</a>):"
74
            - pref: GenerateAuthorityField670
74
            - pref: GenerateAuthorityField670
75
              default: "Work cat."
75
              default: "Work cat."
76
              type: textarea
76
              type: textarea
Lines 111-114 Authorities: Link Here
111
              choices:
111
              choices:
112
                  1: Do
112
                  1: Do
113
                  0: "Don't"
113
                  0: "Don't"
114
            - automatically relink headings that have previously been linked when saving records in the cataloging module.
114
            - automatically relink headings that have previously been linked when saving records in the cataloging module (requires <a href='/cgi-bin/koha/admin/preferences.pl?op=search&searchfield=AutoLinkBiblios'>AutoLinkBiblios</a>).
115
        -
116
            - pref: AutoLinkBiblios
117
              default: no
118
              choices:
119
                  1: Do
120
                  0: "Don't"
121
            - attempt to automatically link headings when saving records in the cataloging module, obeys <a href='/cgi-bin/koha/admin/preferences.pl?op=search&searchfield=LinkerRelink'>LinkerRelink</a> and <a href='/cgi-bin/koha/admin/preferences.pl?op=search&searchfield=CatalogModuleRelink'>CatalogModuleRelink</a> for record edits.
(-)a/t/db_dependent/Biblio.t (-5 / +5 lines)
Lines 68-74 subtest 'AddBiblio' => sub { Link Here
68
    is( Koha::Biblios->count, $nb_biblios,
68
    is( Koha::Biblios->count, $nb_biblios,
69
        'No biblio should have been added if something went wrong' );
69
        'No biblio should have been added if something went wrong' );
70
70
71
    t::lib::Mocks::mock_preference( 'BiblioAddsAuthorities', $marcflavour );
71
    t::lib::Mocks::mock_preference( 'AutoLinkBiblios', $marcflavour );
72
    t::lib::Mocks::mock_preference( 'AutoCreateAuthorities', $marcflavour );
72
    t::lib::Mocks::mock_preference( 'AutoCreateAuthorities', $marcflavour );
73
73
74
    my $mock_biblio = Test::MockModule->new("C4::Biblio");
74
    my $mock_biblio = Test::MockModule->new("C4::Biblio");
Lines 170-176 subtest "Authority creation with default linker" => sub { Link Here
170
    plan tests => 4;
170
    plan tests => 4;
171
    # Automatic authority creation
171
    # Automatic authority creation
172
    t::lib::Mocks::mock_preference('LinkerModule', 'Default');
172
    t::lib::Mocks::mock_preference('LinkerModule', 'Default');
173
    t::lib::Mocks::mock_preference('BiblioAddsAuthorities', 1);
173
    t::lib::Mocks::mock_preference('AutoLinkBiblios', 1);
174
    t::lib::Mocks::mock_preference('AutoCreateAuthorities', 1);
174
    t::lib::Mocks::mock_preference('AutoCreateAuthorities', 1);
175
    t::lib::Mocks::mock_preference('marcflavour', 'MARC21');
175
    t::lib::Mocks::mock_preference('marcflavour', 'MARC21');
176
    my $linker = C4::Linker::Default->new({});
176
    my $linker = C4::Linker::Default->new({});
Lines 447-453 sub run_tests { Link Here
447
        'GetMarcUrls prefixed a MARC21 URL with http://' );
447
        'GetMarcUrls prefixed a MARC21 URL with http://' );
448
448
449
    # Automatic authority creation
449
    # Automatic authority creation
450
    t::lib::Mocks::mock_preference('BiblioAddsAuthorities', 1);
450
    t::lib::Mocks::mock_preference('AutoLinkBiblios', 1);
451
    t::lib::Mocks::mock_preference('AutoCreateAuthorities', 1);
451
    t::lib::Mocks::mock_preference('AutoCreateAuthorities', 1);
452
    my $authorities_mod = Test::MockModule->new( 'C4::Heading' );
452
    my $authorities_mod = Test::MockModule->new( 'C4::Heading' );
453
    $authorities_mod->mock(
453
    $authorities_mod->mock(
Lines 491-497 sub run_tests { Link Here
491
    is($field->subfield($author_relator_subfield), undef, 'Authority does not contain relator subfield');
491
    is($field->subfield($author_relator_subfield), undef, 'Authority does not contain relator subfield');
492
492
493
    # Reset settings
493
    # Reset settings
494
    t::lib::Mocks::mock_preference('BiblioAddsAuthorities', 0);
494
    t::lib::Mocks::mock_preference('AutoLinkBiblios', 0);
495
    t::lib::Mocks::mock_preference('AutoCreateAuthorities', 0);
495
    t::lib::Mocks::mock_preference('AutoCreateAuthorities', 0);
496
}
496
}
497
497
Lines 726-732 subtest 'MarcFieldForCreatorAndModifier' => sub { Link Here
726
subtest 'ModBiblio called from linker test' => sub {
726
subtest 'ModBiblio called from linker test' => sub {
727
    plan tests => 2;
727
    plan tests => 2;
728
    my $called = 0;
728
    my $called = 0;
729
    t::lib::Mocks::mock_preference('BiblioAddsAuthorities', 1);
729
    t::lib::Mocks::mock_preference('AutoLinkBiblios', 1);
730
    my $biblio_mod = Test::MockModule->new( 'C4::Biblio' );
730
    my $biblio_mod = Test::MockModule->new( 'C4::Biblio' );
731
    $biblio_mod->mock( 'LinkBibHeadingsToAuthorities', sub {
731
    $biblio_mod->mock( 'LinkBibHeadingsToAuthorities', sub {
732
        $called = 1;
732
        $called = 1;
(-)a/t/db_dependent/Koha/SearchEngine/Indexer.t (-2 / +1 lines)
Lines 70-76 subtest 'Test indexer calls' => sub { Link Here
70
            if scalar @engines == 1;
70
            if scalar @engines == 1;
71
    }
71
    }
72
72
73
    t::lib::Mocks::mock_preference( 'BiblioAddsAuthorities', 0 );
73
    t::lib::Mocks::mock_preference( 'AutoLinkBiblios', 0 );
74
74
75
    for my $engine ( @engines ){
75
    for my $engine ( @engines ){
76
        t::lib::Mocks::mock_preference( 'SearchEngine', $engine );
76
        t::lib::Mocks::mock_preference( 'SearchEngine', $engine );
77
- 

Return to bug 30025