From 1d12311ac189b928b840e8842076492cdc8369d3 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Wed, 25 Apr 2018 10:37:08 -0300 Subject: [PATCH] Bug 20100: DBRev 17.12.00.040 Signed-off-by: Jonathan Druart --- Koha.pm | 2 +- installer/data/mysql/atomicupdate/bug_20100.perl | 9 --------- installer/data/mysql/updatedatabase.pl | 12 ++++++++++++ 3 files changed, 13 insertions(+), 10 deletions(-) delete mode 100644 installer/data/mysql/atomicupdate/bug_20100.perl diff --git a/Koha.pm b/Koha.pm index dc8b1b0aa2..f2c0d490c0 100644 --- a/Koha.pm +++ b/Koha.pm @@ -29,7 +29,7 @@ use vars qw{ $VERSION }; # - #4 : the developer version. The 4th number is the database subversion. # used by developers when the database changes. updatedatabase take care of the changes itself # and is automatically called by Auth.pm when needed. -$VERSION = "17.12.00.038"; +$VERSION = "17.12.00.040"; sub version { return $VERSION; diff --git a/installer/data/mysql/atomicupdate/bug_20100.perl b/installer/data/mysql/atomicupdate/bug_20100.perl deleted file mode 100644 index b6c5f614a5..0000000000 --- a/installer/data/mysql/atomicupdate/bug_20100.perl +++ /dev/null @@ -1,9 +0,0 @@ -$DBversion = 'XXX'; # will be replaced by the RM -if( CheckVersion( $DBversion ) ) { - $dbh->do( q| -INSERT IGNORE INTO systempreferences ( value, variable, options, explanation, type ) VALUES ( '0', 'ProtectSuperlibrarianPrivileges', NULL, 'If enabled, non-superlibrarians cannot set superlibrarian privileges', 'YesNo' ); - |); - - SetVersion( $DBversion ); - print "Upgrade to $DBversion done (Bug 20100: Should a non-superlibrarian be able to add superlibrarian privileges?)\n"; -} diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index cc569b31b4..98aae8d060 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -15969,6 +15969,18 @@ if( CheckVersion( $DBversion ) ) { print "Upgrade to $DBversion done (Bug 20482 - Use Bibliographic code value for Basque, Maori and Albanian languages)\n"; } +$DBversion = '17.12.00.040'; +if( CheckVersion( $DBversion ) ) { + + $dbh->do( q{ + INSERT IGNORE INTO systempreferences ( value, variable, options, explanation, type ) + VALUES ( '0', 'ProtectSuperlibrarianPrivileges', NULL, 'If enabled, non-superlibrarians cannot set superlibrarian privileges', 'YesNo' ) + } ); + + SetVersion( $DBversion ); + print "Upgrade to $DBversion done (Bug 20100 - Add new system preference ProtectSuperlibrarianPrivileges)\n"; +} + # SEE bug 13068 # if there is anything in the atomicupdate, read and execute it. -- 2.39.5