Bug 20310: (QA follow-up) Add 'Opac' to pref and description

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This commit is contained in:
Nick Clemens 2021-07-09 12:02:38 +00:00 committed by Jonathan Druart
parent ea8d8945b7
commit 61ed4887e1
5 changed files with 12 additions and 12 deletions

View File

@ -1,8 +0,0 @@
$DBversion = 'XXX'; # will be replaced by the RM
if( CheckVersion( $DBversion ) ) {
$dbh->do(q{
INSERT IGNORE INTO systempreferences ( `variable`, `value`, `options`, `explanation`, `type` ) VALUES
('ArticleRequestsHostRedirection', '0', NULL, 'Enables redirection from child to host', 'YesNo')
});
NewVersion( $DBversion, 20310, "Add pref ArticleRequestsHostRedirection");
}

View File

@ -0,0 +1,8 @@
$DBversion = 'XXX'; # will be replaced by the RM
if( CheckVersion( $DBversion ) ) {
$dbh->do(q{
INSERT IGNORE INTO systempreferences ( `variable`, `value`, `options`, `explanation`, `type` ) VALUES
('ArticleRequestsOpacHostRedirection', '0', NULL, 'Enables redirection from child to host when requesting article on OPAC', 'YesNo')
});
NewVersion( $DBversion, 20310, "Add pref ArticleRequestsOpacHostRedirection");
}

View File

@ -56,7 +56,7 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, `
('AnonSuggestions','0',NULL,'Set to enable Anonymous suggestions to AnonymousPatron borrowernumber','YesNo'),
('AnonymousPatron','0',NULL,'Set the identifier (borrowernumber) of the anonymous patron. Used for suggestion and checkout history privacy',''),
('ArticleRequests', '0', NULL, 'Enables the article request feature', 'YesNo'),
('ArticleRequestsHostRedirection', '0', NULL, 'Enables redirection from child to host', 'YesNo'),
('ArticleRequestsOpacHostRedirection', '0', NULL, 'Enables redirection from child to host when requesting articles on the Opac', 'YesNo'),
('ArticleRequestsLinkControl', 'calc', 'always|calc', 'Control display of article request link on search results', 'Choice'),
('ArticleRequestsMandatoryFields', '', NULL, 'Comma delimited list of required fields for bibs where article requests rule = ''yes''', 'multiple'),
('ArticleRequestsMandatoryFieldsItemOnly', '', NULL, 'Comma delimited list of required fields for bibs where article requests rule = ''item_only''', 'multiple'),

View File

@ -1193,11 +1193,11 @@ Circulation:
0: "Don't enable"
- patrons to place article requests.
-
- pref: ArticleRequestsHostRedirection
- pref: ArticleRequestsOpacHostRedirection
choices:
yes: Enable
no: Disable
- " redirection from child to host based on MARC21 773$w when the child has no items."
- " redirection from child to host based on MARC21 773$w when the child has no items when requesting articles on the Opac."
-
- pref: ArticleRequestsLinkControl
choices:

View File

@ -79,7 +79,7 @@ if ( $action eq 'create' ) {
exit;
# Should we redirect?
}
elsif ( !$action && C4::Context->preference('ArticleRequestsHostRedirection') ) {
elsif ( !$action && C4::Context->preference('ArticleRequestsOpacHostRedirection') ) {
# Conditions: no items, host item entry (MARC21 773)
my ( $host, $pageinfo ) = $biblio->get_marc_host( { no_items => 1 } );
if ($host) {