Bugzilla – Attachment 184571 Details for
Bug 32682
Add permission for viewing patron reading history
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 32682: Fix atomicupdate
Bug-32682-Fix-atomicupdate.patch (text/plain), 2.33 KB, created by
David Flater
on 2025-07-23 20:07:58 UTC
(
hide
)
Description:
Bug 32682: Fix atomicupdate
Filename:
MIME Type:
Creator:
David Flater
Created:
2025-07-23 20:07:58 UTC
Size:
2.33 KB
patch
obsolete
>From de8f3ce4486f562416da23244c1fbb1fe4dafd3b Mon Sep 17 00:00:00 2001 >From: David Flater <flaterdavid@gmail.com> >Date: Wed, 23 Jul 2025 19:44:36 +0000 >Subject: [PATCH] Bug 32682: Fix atomicupdate > >--- > .../atomicupdate/bug_32682_add_permission.pl | 30 +++++++++++-------- > 1 file changed, 18 insertions(+), 12 deletions(-) > >diff --git a/installer/data/mysql/atomicupdate/bug_32682_add_permission.pl b/installer/data/mysql/atomicupdate/bug_32682_add_permission.pl >index 33b80ac3a0..f425e06491 100755 >--- a/installer/data/mysql/atomicupdate/bug_32682_add_permission.pl >+++ b/installer/data/mysql/atomicupdate/bug_32682_add_permission.pl >@@ -15,21 +15,27 @@ return { > } > ); > >- # permissions > say $out "Added new permission 'view_checkout_history'"; > >- # $dbh->do( >- # q{ >- # INSERT IGNORE INTO user_permissions (borrowernumber, module_bit, code) >- # SELECT borrowernumber, 10, 'view_checkout_history' FROM user_permissions WHERE code = 'remaining_permissions' >- # } >- # ); >+ my $IntranetBrowsingHistory = C4::Context->preference('intranetreadinghistory'); >+ if ($IntranetBrowsingHistory) { > >- # TODO: migrate libraries' "intranetreadinghistory" syspref (will this require us to not fully remove it until we're sure everyone has migrated off of it?) >+ my $insert_sth = $dbh->prepare( >+ "INSERT IGNORE INTO user_permissions (borrowernumber, module_bit, code) VALUES (?, ?, ?)"); >+ >+ my $sth = $dbh->prepare("SELECT borrowernumber FROM user_permissions WHERE code = 'edit_borrowers'"); >+ $sth->execute(); >+ >+ my @borrowernumbers; >+ while ( my ($borrowernumber) = $sth->fetchrow_array() ) { >+ push @borrowernumbers, $borrowernumber; >+ } >+ >+ my @rows_to_insert = ( map { [ $_, 4, "view_checkout_history" ] } @borrowernumbers ); >+ foreach my $row (@rows_to_insert) { $insert_sth->execute( @{$row} ); } >+ >+ say_success( $out, "view_checkout_history added to all borrowers with edit_borrowers" ); >+ } > >- # Other information >- say_success( $out, "Use green for success" ); >- say_warning( $out, "Use yellow for warning/a call to action" ); >- say_info( $out, "Use blue for further information" ); > }, > }; >-- >2.39.5
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 32682
:
183844
|
183845
|
183846
| 184571 |
184572
|
184832
|
184833