Bug 16401: DBRev 17.06.00.013
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Wed, 11 Oct 2017 15:56:24 +0000 (12:56 -0300)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Wed, 11 Oct 2017 16:05:36 +0000 (13:05 -0300)
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Koha.pm
installer/data/mysql/atomicupdate/bug_16401.perl [deleted file]
installer/data/mysql/updatedatabase.pl

diff --git a/Koha.pm b/Koha.pm
index 6cb1d53..c6dd33b 100644 (file)
--- 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 (file)
index 75d899d..0000000
+++ /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";
-}
index 536f40e..9a9cc6f 100755 (executable)
@@ -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.