From aae45a99ec0669229a72505f6e0b34b10230db4c Mon Sep 17 00:00:00 2001 From: Lucas Gass Date: Fri, 26 Jan 2024 17:36:39 +0000 Subject: [PATCH] Bug 14180: Perltidy To test: 1. APPLY PATCH, updatedatebase, restart_all 2. Search for the system preference 'AlwaysLoadCheckoutsTable' and set it to 'Do'. 3. Go to 'circ/circulation.pl?borrowernumber=X' for a patron with checkouts. ( Check out tab ). 4. The table should load right away. 5. Go to 'members/moremember.pl?borrowernumber=X' for a patron with checkouts. ( Details tab ). 6. The table should load right way. 7. Set a value in the 'LoadCheckoutsTableDelay' system preference. 8. Back on 'circ/circulation.pl?borrowernumber=X', make sure the delay is honored. You should see a message like "Checkouts table will automatically load in X seconds". 9. The delay should NOT be honored on'members/moremember.pl?borrowernumber=X', that table should load right away/ 10. Turn off 'AlwaysLoadCheckoutsTable' and make sure the table does not load, or loads according to the cookie set when checking the 'Always show checkouts automatically' checkbox. --- installer/data/mysql/atomicupdate/bug_14180.pl | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/installer/data/mysql/atomicupdate/bug_14180.pl b/installer/data/mysql/atomicupdate/bug_14180.pl index 3c30995d57..dffa605038 100755 --- a/installer/data/mysql/atomicupdate/bug_14180.pl +++ b/installer/data/mysql/atomicupdate/bug_14180.pl @@ -1,15 +1,18 @@ use Modern::Perl; return { - bug_number => "14180", + bug_number => "14180", description => "Add system preference AlwaysLoadCheckoutsTable", - up => sub { + up => sub { my ($args) = @_; - my ($dbh, $out) = @$args{qw(dbh out)}; + my ( $dbh, $out ) = @$args{qw(dbh out)}; + # Do you stuffs here - $dbh->do(q{ + $dbh->do( + q{ INSERT IGNORE INTO systempreferences (`variable`,`value`,`options`,`explanation`,`type`) VALUES ('AlwaysLoadCheckoutsTable','0','','Option to always load the checkout table','YesNo') - }); + } + ); }, }; -- 2.30.2