From db3e175c46ab466e484a34c97d8a64a6482fd194 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Fri, 20 Apr 2018 13:12:36 -0300 Subject: [PATCH] Bug 19974: DBRev 17.12.00.034 Signed-off-by: Jonathan Druart --- Koha.pm | 2 +- .../data/mysql/atomicupdate/bug_19974.perl | 26 ------------------ installer/data/mysql/updatedatabase.pl | 27 +++++++++++++++++++ 3 files changed, 28 insertions(+), 27 deletions(-) delete mode 100644 installer/data/mysql/atomicupdate/bug_19974.perl diff --git a/Koha.pm b/Koha.pm index 93c07cb4e3..e4a13eba85 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.034"; +$VERSION = "17.12.00.035"; sub version { return $VERSION; diff --git a/installer/data/mysql/atomicupdate/bug_19974.perl b/installer/data/mysql/atomicupdate/bug_19974.perl deleted file mode 100644 index 602fa895b7..0000000000 --- a/installer/data/mysql/atomicupdate/bug_19974.perl +++ /dev/null @@ -1,26 +0,0 @@ -$DBversion = 'XXX'; # will be replaced by the RM -if( CheckVersion( $DBversion ) ) { - my ( $original_value ) = $dbh->selectrow_array(q| - SELECT value FROM systempreferences WHERE variable="MarkLostItemsAsReturned" - |); - if ( $original_value and $original_value eq '1' ) { - $dbh->do(q{ - UPDATE systempreferences - SET type="multiple", - options="batchmod|moredetail|cronjob|additem", - value="batchmod,moredetail,cronjob,additem" - WHERE variable="MarkLostItemsAsReturned" - }); - } else { - $dbh->do(q{ - UPDATE systempreferences - SET type="multiple", - options="batchmod|moredetail|cronjob|additem", - value="" - WHERE variable="MarkLostItemsAsReturned" - }); - } - - SetVersion( $DBversion ); - print "Upgrade to $DBversion done (Bug 19974 - Make MarkLostItemsAsReturned multiple)\n"; -} diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index 3f43ea1ba2..eb6313c7c8 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -15883,6 +15883,33 @@ if( CheckVersion( $DBversion ) ) { print "Upgrade to $DBversion done (Bug 18790 - Add ability to void payment)\n"; } +$DBversion = '17.12.00.035'; +if( CheckVersion( $DBversion ) ) { + my ( $original_value ) = $dbh->selectrow_array(q| + SELECT value FROM systempreferences WHERE variable="MarkLostItemsAsReturned" + |); + if ( $original_value and $original_value eq '1' ) { + $dbh->do(q{ + UPDATE systempreferences + SET type="multiple", + options="batchmod|moredetail|cronjob|additem", + value="batchmod,moredetail,cronjob,additem" + WHERE variable="MarkLostItemsAsReturned" + }); + } else { + $dbh->do(q{ + UPDATE systempreferences + SET type="multiple", + options="batchmod|moredetail|cronjob|additem", + value="" + WHERE variable="MarkLostItemsAsReturned" + }); + } + + SetVersion( $DBversion ); + print "Upgrade to $DBversion done (Bug 19974 - Make MarkLostItemsAsReturned multiple)\n"; +} + # SEE bug 13068 # if there is anything in the atomicupdate, read and execute it. -- 2.20.1