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

(-)a/installer/data/mysql/atomicupdate/bug_20130.perl (-8 lines)
Lines 1-8 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/atomicupdate/bug_20310.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
            ('ArticleRequestsOpacHostRedirection', '0', NULL, 'Enables redirection from child to host when requesting article on OPAC', 'YesNo')
6
    });
7
    NewVersion( $DBversion, 20310, "Add pref ArticleRequestsOpacHostRedirection");
8
}
(-)a/installer/data/mysql/mandatory/sysprefs.sql (-1 / +1 lines)
Lines 56-62 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
('ArticleRequestsOpacHostRedirection', '0', NULL, 'Enables redirection from child to host when requesting articles on the Opac', 'YesNo'),
60
('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'),
61
('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'),
62
('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 (-2 / +2 lines)
Lines 1193-1203 Circulation: Link Here
1193
                  0: "Don't enable"
1193
                  0: "Don't enable"
1194
            - patrons to place article requests.
1194
            - patrons to place article requests.
1195
        -
1195
        -
1196
            - pref: ArticleRequestsHostRedirection
1196
            - pref: ArticleRequestsOpacHostRedirection
1197
              choices:
1197
              choices:
1198
                  yes: Enable
1198
                  yes: Enable
1199
                  no: Disable
1199
                  no: Disable
1200
            - " redirection from child to host based on MARC21 773$w when the child has no items."
1200
            - " redirection from child to host based on MARC21 773$w when the child has no items when requesting articles on the Opac."
1201
        -
1201
        -
1202
            - pref: ArticleRequestsLinkControl
1202
            - pref: ArticleRequestsLinkControl
1203
              choices:
1203
              choices:
(-)a/opac/opac-request-article.pl (-2 / +1 lines)
Lines 81-87 if ( $action eq 'create' ) { Link Here
81
    exit;
81
    exit;
82
# Should we redirect?
82
# Should we redirect?
83
}
83
}
84
elsif ( !$action && C4::Context->preference('ArticleRequestsHostRedirection') ) {
84
elsif ( !$action && C4::Context->preference('ArticleRequestsOpacHostRedirection') ) {
85
  # Conditions: no items, host item entry (MARC21 773)
85
  # Conditions: no items, host item entry (MARC21 773)
86
  my ( $host, $pageinfo ) = $biblio->get_marc_host( { no_items => 1 } );
86
  my ( $host, $pageinfo ) = $biblio->get_marc_host( { no_items => 1 } );
87
  if ($host) {
87
  if ($host) {
88
- 

Return to bug 20310