From 4e872cec54d4f648335cf7e2566d2e38d9f71a3a Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Wed, 11 Oct 2017 12:56:24 -0300 Subject: [PATCH] Bug 16401: DBRev 17.06.00.013 Signed-off-by: Jonathan Druart --- Koha.pm | 2 +- installer/data/mysql/atomicupdate/bug_16401.perl | 15 --------------- installer/data/mysql/updatedatabase.pl | 15 +++++++++++++++ 3 files changed, 16 insertions(+), 16 deletions(-) delete mode 100644 installer/data/mysql/atomicupdate/bug_16401.perl diff --git a/Koha.pm b/Koha.pm index 6cb1d53f49..c6dd33b485 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.06.00.012"; +$VERSION = "17.06.00.013"; sub version { return $VERSION; diff --git a/installer/data/mysql/atomicupdate/bug_16401.perl b/installer/data/mysql/atomicupdate/bug_16401.perl deleted file mode 100644 index 75d899d066..0000000000 --- a/installer/data/mysql/atomicupdate/bug_16401.perl +++ /dev/null @@ -1,15 +0,0 @@ -$DBversion = 'XXX'; # will be replaced by the RM -if( CheckVersion( $DBversion ) ) { - $dbh->do( "UPDATE systempreferences SET value = CONCAT('http://', value) WHERE variable = 'staffClientBaseURL' AND value <> '' AND value NOT LIKE 'http%'" ); - - my ( $staffClientBaseURL_used_in_notices ) = $dbh->selectrow_array(q| - SELECT COUNT(*) FROM letter where content like "%staffClientBaseURL%" - |); - if ( $staffClientBaseURL_used_in_notices ) { - warn "\tYou may need to update one or more notice templates if they contain 'staffClientBaseURL'\n"; - } - - # Always end with this (adjust the bug info) - SetVersion( $DBversion ); - print "Upgrade to $DBversion done (Bug 16401 - fix potentialy bad set staffClientBaseURL preference)\n"; -} diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index 536f40eafb..9a9cc6f677 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -14722,6 +14722,21 @@ if( CheckVersion( $DBversion ) ) { print "Upgrade to $DBversion done (Bug 19043 - Z39.50 target for Columbia University is no longer publicly available.)\n"; } +$DBversion = '17.06.00.013'; +if( CheckVersion( $DBversion ) ) { + $dbh->do( "UPDATE systempreferences SET value = CONCAT('http://', value) WHERE variable = 'staffClientBaseURL' AND value <> '' AND value NOT LIKE 'http%'" ); + + my ( $staffClientBaseURL_used_in_notices ) = $dbh->selectrow_array(q| + SELECT COUNT(*) FROM letter where content like "%staffClientBaseURL%" + |); + if ( $staffClientBaseURL_used_in_notices ) { + warn "\tYou may need to update one or more notice templates if they contain 'staffClientBaseURL'\n"; + } + + SetVersion( $DBversion ); + print "Upgrade to $DBversion done (Bug 16401 - fix potentialy bad set staffClientBaseURL preference)\n"; +} + # DEVELOPER PROCESS, search for anything to execute in the db_update directory # SEE bug 13068 # if there is anything in the atomicupdate, read and execute it. -- 2.39.5