From a17ea63d028fe500f80ff75b42a4fa1a511fe708 Mon Sep 17 00:00:00 2001 From: Joy Nelson Date: Wed, 20 May 2020 14:59:21 +0000 Subject: [PATCH] Bug 24854: DBRev 19.11.05.007 Signed-off-by: Joy Nelson --- Koha.pm | 2 +- .../data/mysql/atomicupdate/bug_24854.perl | 16 ---------------- installer/data/mysql/updatedatabase.pl | 17 +++++++++++++++++ 3 files changed, 18 insertions(+), 17 deletions(-) delete mode 100644 installer/data/mysql/atomicupdate/bug_24854.perl diff --git a/Koha.pm b/Koha.pm index 14e5a78713..5f7b093c5f 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 = "19.11.05.006"; +$VERSION = "19.11.05.007"; sub version { return $VERSION; diff --git a/installer/data/mysql/atomicupdate/bug_24854.perl b/installer/data/mysql/atomicupdate/bug_24854.perl deleted file mode 100644 index f13a11b01c..0000000000 --- a/installer/data/mysql/atomicupdate/bug_24854.perl +++ /dev/null @@ -1,16 +0,0 @@ -$DBversion = 'XXX'; # will be replaced by the RM -if( CheckVersion( $DBversion ) ) { - my $ft_enabled = $dbh->selectrow_array(q| - SELECT COUNT(*) FROM systempreferences WHERE variable like "IDreamBooks%" and value="1" - |); - if ( $ft_enabled ) { - $dbh->do(q| - UPDATE systempreferences - SET value="0" - WHERE variable like "IDreamBooks%" - |); - } - - SetVersion( $DBversion ); - print "Upgrade to $DBversion done (Bug 24854 - Disable IDreamBooks)\n"; -} diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index 841688da34..322694dc4c 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -20561,6 +20561,23 @@ if( CheckVersion( $DBversion ) ) { print "Upgrade to $DBversion done (Bug 25389: Catch errant cases of LOST_RETURNED)\n"; } +$DBversion = 'XXX'; # will be replaced by the RM +if( CheckVersion( $DBversion ) ) { + my $ft_enabled = $dbh->selectrow_array(q| + SELECT COUNT(*) FROM systempreferences WHERE variable like "IDreamBooks%" and value="1" + |); + if ( $ft_enabled ) { + $dbh->do(q| + UPDATE systempreferences + SET value="0" + WHERE variable like "IDreamBooks%" + |); + } + + SetVersion( $DBversion ); + print "Upgrade to $DBversion done (Bug 24854 - Disable IDreamBooks)\n"; +} + # SEE bug 13068 # if there is anything in the atomicupdate, read and execute it. my $update_dir = C4::Context->config('intranetdir') . '/installer/data/mysql/atomicupdate/'; -- 2.39.5