Bugzilla – Attachment 38974 Details for
Bug 7976
"Borrow Permission" is not used and can be removed
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[PASSED QA] Bug 7976: Update borrowers.flags
PASSED-QA-Bug-7976-Update-borrowersflags.patch (text/plain), 2.52 KB, created by
Kyle M Hall (khall)
on 2015-05-08 12:41:19 UTC
(
hide
)
Description:
[PASSED QA] Bug 7976: Update borrowers.flags
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2015-05-08 12:41:19 UTC
Size:
2.52 KB
patch
obsolete
>From b72b6238934f57d5c62df248f8c3f95a88048907 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@biblibre.com> >Date: Thu, 16 Apr 2015 09:46:26 +0200 >Subject: [PATCH] [PASSED QA] Bug 7976: Update borrowers.flags > >The borrowers.flags values need to be updated to prevent side effects. > >Test plan: >Set the borrow permission flags for some borrowers >Execute the updatedb entry and verify the flags has been updated (-128) >only for borrowers with this permission set. > >Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> > >Moved updatedatabase entry (was in wrong position) to atomicupdate >with commented copy of orignal > >No koha-qa errors > >Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> >--- > .../bug-7976-update-borrower-flags.sql | 23 ++++++++++++++++++++ > installer/data/mysql/updatedatabase.pl | 11 --------- > 2 files changed, 23 insertions(+), 11 deletions(-) > create mode 100644 installer/data/mysql/atomicupdate/bug-7976-update-borrower-flags.sql > >diff --git a/installer/data/mysql/atomicupdate/bug-7976-update-borrower-flags.sql b/installer/data/mysql/atomicupdate/bug-7976-update-borrower-flags.sql >new file mode 100644 >index 0000000..723d042 >--- /dev/null >+++ b/installer/data/mysql/atomicupdate/bug-7976-update-borrower-flags.sql >@@ -0,0 +1,23 @@ >+UPDATE borrowers >+SET flags = flags - ( flags & (1<<7) ) >+WHERE flags IS NOT NULL >+ AND flags > 0; >+ >+DELETE FROM userflags WHERE bit=7; >+ >+-- $DBversion = "3.19.00.XXX"; >+-- if ( CheckVersion($DBversion) ) { >+-- # Remove the borrow permission flag (bit 7) >+-- $dbh->do(q| >+-- UPDATE borrowers >+-- SET flags = flags - ( flags & (1<<7) ) >+-- WHERE flags IS NOT NULL >+-- AND flags > 0 >+-- |); >+-- $dbh->do(q| >+-- DELETE FROM userflags WHERE bit=7; >+-- |); >+-- print "Upgrade to $DBversion done (Bug 7976 - Remove the 'borrow' permission)\n"; >+-- SetVersion($DBversion); >+-- } >+ >diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl >index 21b18c9..6c4b597 100755 >--- a/installer/data/mysql/updatedatabase.pl >+++ b/installer/data/mysql/updatedatabase.pl >@@ -10410,17 +10410,6 @@ foreach my $file ( sort readdir $dirh ) { > } > } > >- >-$DBversion = "3.19.00.XXX"; >-if ( CheckVersion($DBversion) ) { >- $dbh->do(q| >- DELETE FROM userflags WHERE bit=7; >- |); >- print "Upgrade to $DBversion done (Bug 7976 - Remove the 'borrow' permission)\n"; >- SetVersion($DBversion); >-} >- >- > =head1 FUNCTIONS > > =head2 TableExists($table) >-- >1.7.2.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 7976
:
37382
|
37914
|
37925
|
37944
|
38900
|
38901
| 38974