From 57f2ff845918a83300058184b2ce6e5892e7888f Mon Sep 17 00:00:00 2001 From: Tomas Cohen Arazi Date: Wed, 1 Nov 2023 17:49:03 -0300 Subject: [PATCH] Bug 18203: Rename column Signed-off-by: Tomas Cohen Arazi --- admin/categories.pl | 6 +++--- installer/data/mysql/atomicupdate/bug_18203.pl | 4 ++-- installer/data/mysql/kohastructure.sql | 2 +- .../intranet-tmpl/prog/en/modules/admin/categories.tt | 10 +++++----- .../opac-tmpl/bootstrap/en/modules/opac-illrequests.tt | 4 ++-- opac/opac-illrequests.pl | 4 ++-- 6 files changed, 15 insertions(+), 15 deletions(-) diff --git a/admin/categories.pl b/admin/categories.pl index 6a335b9737..365bfb98f5 100755 --- a/admin/categories.pl +++ b/admin/categories.pl @@ -72,7 +72,7 @@ elsif ( $op eq 'add_validate' ) { my $category_type = $input->param('category_type'); my $BlockExpiredPatronOpacActions = $input->param('BlockExpiredPatronOpacActions'); my $checkPrevCheckout = $input->param('checkprevcheckout'); - my $canplaceillopac = $input->param('canplaceillopac'); + my $can_place_ill_in_opac = $input->param('can_place_ill_in_opac'); my $default_privacy = $input->param('default_privacy'); my $reset_password = $input->param('reset_password'); my $change_password = $input->param('change_password'); @@ -106,7 +106,7 @@ elsif ( $op eq 'add_validate' ) { $category->can_be_guarantee($can_be_guarantee); $category->BlockExpiredPatronOpacActions($BlockExpiredPatronOpacActions); $category->checkprevcheckout($checkPrevCheckout); - $category->canplaceillopac($canplaceillopac); + $category->can_place_ill_in_opac($can_place_ill_in_opac); $category->default_privacy($default_privacy); $category->reset_password($reset_password); $category->change_password($change_password); @@ -140,7 +140,7 @@ elsif ( $op eq 'add_validate' ) { can_be_guarantee => $can_be_guarantee, BlockExpiredPatronOpacActions => $BlockExpiredPatronOpacActions, checkprevcheckout => $checkPrevCheckout, - canplaceillopac => $canplaceillopac, + can_place_ill_in_opac => $can_place_ill_in_opac, default_privacy => $default_privacy, reset_password => $reset_password, change_password => $change_password, diff --git a/installer/data/mysql/atomicupdate/bug_18203.pl b/installer/data/mysql/atomicupdate/bug_18203.pl index 68a2145739..17fea2a2df 100755 --- a/installer/data/mysql/atomicupdate/bug_18203.pl +++ b/installer/data/mysql/atomicupdate/bug_18203.pl @@ -6,10 +6,10 @@ return { up => sub { my ($args) = @_; my ($dbh, $out) = @$args{qw(dbh out)}; - unless ( column_exists('categories', 'canplaceillopac') ) { + unless ( column_exists('categories', 'can_place_ill_in_opac') ) { $dbh->do(q{ ALTER TABLE `categories` - ADD COLUMN `canplaceillopac` TINYINT(1) NOT NULL DEFAULT 1 COMMENT 'can this patron category place interlibrary loan requests' + ADD COLUMN `can_place_ill_in_opac` TINYINT(1) NOT NULL DEFAULT 1 COMMENT 'can this patron category place interlibrary loan requests' AFTER `checkprevcheckout`; }); } diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql index d916454a82..c51df73a48 100644 --- a/installer/data/mysql/kohastructure.sql +++ b/installer/data/mysql/kohastructure.sql @@ -1763,7 +1763,7 @@ CREATE TABLE `categories` ( `BlockExpiredPatronOpacActions` tinyint(1) NOT NULL DEFAULT -1 COMMENT 'wheither or not a patron of this category can renew books or place holds once their card has expired. 0 means they can, 1 means they cannot, -1 means use syspref BlockExpiredPatronOpacActions', `default_privacy` enum('default','never','forever') NOT NULL DEFAULT 'default' COMMENT 'Default privacy setting for this patron category', `checkprevcheckout` varchar(7) NOT NULL DEFAULT 'inherit' COMMENT 'produce a warning for this patron category if this item has previously been checked out to this patron if ''yes'', not if ''no'', defer to syspref setting if ''inherit''.', - `canplaceillopac` tinyint(1) NOT NULL DEFAULT 1 COMMENT 'can this patron category place interlibrary loan requests', + `can_place_ill_in_opac` tinyint(1) NOT NULL DEFAULT 1 COMMENT 'can this patron category place interlibrary loan requests', `can_be_guarantee` tinyint(1) NOT NULL DEFAULT 0 COMMENT 'if patrons of this category can be guarantees', `reset_password` tinyint(1) DEFAULT NULL COMMENT 'if patrons of this category can do the password reset flow,', `change_password` tinyint(1) DEFAULT NULL COMMENT 'if patrons of this category can change their passwords in the OAPC', diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/categories.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/categories.tt index aff8ca18e5..a1990144c4 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/categories.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/categories.tt @@ -386,9 +386,9 @@ [% END %] [% IF ( Koha.Preference('ILLModule') ) %]
  • - - + [% IF category.can_place_ill_in_opac %] [% ELSE %] @@ -507,7 +507,7 @@ [% IF ( Koha.Preference('ILLModule') ) %] Can place ILL in OPAC: - [% IF category.canplaceillopac %]Yes[% ELSE %]No[% END %] + [% IF category.can_place_ill_in_opac %]Yes[% ELSE %]No[% END %] [% END %] Can be guarantee[% IF category.can_be_guarantee %]Yes[% ELSE %]No[% END %] @@ -697,7 +697,7 @@ [% END %] [% IF ( Koha.Preference('ILLModule') ) %] - [% IF category.canplaceillopac %] Yes [% ELSE %] No [% END %] + [% IF category.can_place_ill_in_opac %] Yes [% ELSE %] No [% END %] [% END %] [% IF category.can_be_guarantee %] Yes [% ELSE %] No [% END %] diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-illrequests.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-illrequests.tt index aab5eb19e3..e5a96e3c35 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-illrequests.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-illrequests.tt @@ -112,7 +112,7 @@

    Interlibrary loan requests

    [% INCLUDE messages %] - [% IF canplaceillopac %] + [% IF can_place_ill_in_opac %] [% END %] - [% IF canplaceillopac %] + [% IF can_place_ill_in_opac %]
    diff --git a/opac/opac-illrequests.pl b/opac/opac-illrequests.pl index 5a351edc9a..5173b8da6c 100755 --- a/opac/opac-illrequests.pl +++ b/opac/opac-illrequests.pl @@ -72,7 +72,7 @@ if ( $illrequest_id = $params->{illrequest_id} ) { } } -if ( ( $op eq 'create' || $op eq 'cancreq' || $op eq 'update' ) && !$patron->_result->categorycode->canplaceillopac ) { +if ( ( $op eq 'create' || $op eq 'cancreq' || $op eq 'update' ) && !$patron->_result->categorycode->can_place_ill_in_opac ) { print $query->redirect('/cgi-bin/koha/errors/403.pl'); exit; } @@ -179,7 +179,7 @@ if ( $op eq 'list' ) { } $template->param( - canplaceillopac => $patron->_result->categorycode->canplaceillopac, + can_place_ill_in_opac => $patron->_result->categorycode->can_place_ill_in_opac, message => $params->{message}, illrequestsview => 1, method => $op -- 2.39.5