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

(-)a/Koha/Biblio.pm (+1 lines)
Lines 910-915 sub host_record { Link Here
910
    my ($self, $params) = @_;
910
    my ($self, $params) = @_;
911
    my $no_items = $params->{no_items};
911
    my $no_items = $params->{no_items};
912
    return if C4::Context->preference('marcflavour') eq 'UNIMARC'; # TODO
912
    return if C4::Context->preference('marcflavour') eq 'UNIMARC'; # TODO
913
    return if !C4::Context->preference('ArticleRequestsHostRedirection');
913
    return if $params->{no_items} && $self->items->count > 0;
914
    return if $params->{no_items} && $self->items->count > 0;
914
915
915
    my $record;
916
    my $record;
(-)a/installer/data/mysql/atomicupdate/bug_20130.perl (+8 lines)
Line 0 Link Here
1
$DBversion = 'XXX'; # will be replaced by the RM
2
if( CheckVersion( $DBversion ) ) {
3
    $dbh->do(q{
4
        INSERT IGNORE INTO systempreferences ( `variable`, `value`, `options`, `explanation`, `type` ) VALUES
5
            ('ArticleRequestsHostRedirection', '0', NULL, 'Enables redirection from child to host', 'YesNo')
6
    });
7
    NewVersion( $DBversion, 20310, "Add pref ArticleRequestsHostRedirection");
8
}
(-)a/installer/data/mysql/mandatory/sysprefs.sql (+1 lines)
Lines 56-61 INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` Link Here
56
('AnonSuggestions','0',NULL,'Set to enable Anonymous suggestions to AnonymousPatron borrowernumber','YesNo'),
56
('AnonSuggestions','0',NULL,'Set to enable Anonymous suggestions to AnonymousPatron borrowernumber','YesNo'),
57
('AnonymousPatron','0',NULL,'Set the identifier (borrowernumber) of the anonymous patron. Used for suggestion and checkout history privacy',''),
57
('AnonymousPatron','0',NULL,'Set the identifier (borrowernumber) of the anonymous patron. Used for suggestion and checkout history privacy',''),
58
('ArticleRequests', '0', NULL, 'Enables the article request feature', 'YesNo'),
58
('ArticleRequests', '0', NULL, 'Enables the article request feature', 'YesNo'),
59
('ArticleRequestsHostRedirection', '0', NULL, 'Enables redirection from child to host', 'YesNo'),
59
('ArticleRequestsLinkControl', 'calc', 'always|calc', 'Control display of article request link on search results', 'Choice'),
60
('ArticleRequestsLinkControl', 'calc', 'always|calc', 'Control display of article request link on search results', 'Choice'),
60
('ArticleRequestsMandatoryFields', '', NULL, 'Comma delimited list of required fields for bibs where article requests rule = ''yes''', 'multiple'),
61
('ArticleRequestsMandatoryFields', '', NULL, 'Comma delimited list of required fields for bibs where article requests rule = ''yes''', 'multiple'),
61
('ArticleRequestsMandatoryFieldsItemOnly', '', NULL, 'Comma delimited list of required fields for bibs where article requests rule = ''item_only''', 'multiple'),
62
('ArticleRequestsMandatoryFieldsItemOnly', '', NULL, 'Comma delimited list of required fields for bibs where article requests rule = ''item_only''', 'multiple'),
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref (+6 lines)
Lines 1192-1197 Circulation: Link Here
1192
                  1: Enable
1192
                  1: Enable
1193
                  0: "Don't enable"
1193
                  0: "Don't enable"
1194
            - patrons to place article requests.
1194
            - patrons to place article requests.
1195
        -
1196
            - pref: ArticleRequestsHostRedirection
1197
              choices:
1198
                  yes: Enable
1199
                  no: Disable
1200
            - " redirection from child to host based on MARC21 773$w when the child has no items."
1195
        -
1201
        -
1196
            - pref: ArticleRequestsLinkControl
1202
            - pref: ArticleRequestsLinkControl
1197
              choices:
1203
              choices:
(-)a/t/db_dependent/Koha/Biblio/host_record.t (-1 / +1 lines)
Lines 40-45 subtest 'host_record' => sub { Link Here
40
40
41
    t::lib::Mocks::mock_preference( 'marcflavour', 'MARC21' );
41
    t::lib::Mocks::mock_preference( 'marcflavour', 'MARC21' );
42
    t::lib::Mocks::mock_preference( 'MARCOrgCode', 'xyz' );
42
    t::lib::Mocks::mock_preference( 'MARCOrgCode', 'xyz' );
43
    t::lib::Mocks::mock_preference( 'ArticleRequestsHostRedirection', 1 );
43
44
44
    my $bib1 = $builder->build_object({ class => 'Koha::Biblios' });
45
    my $bib1 = $builder->build_object({ class => 'Koha::Biblios' });
45
    my $bib2 = $builder->build_object({ class => 'Koha::Biblios' });
46
    my $bib2 = $builder->build_object({ class => 'Koha::Biblios' });
46
- 

Return to bug 20310