Bug 17187 - DBRev 16.06.00.023
authorKyle M Hall <kyle@bywatersolutions.com>
Fri, 9 Sep 2016 14:06:17 +0000 (14:06 +0000)
committerKyle M Hall <kyle@bywatersolutions.com>
Fri, 9 Sep 2016 14:06:17 +0000 (14:06 +0000)
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Koha.pm
installer/data/mysql/atomicupdate/Bug_17187_dbrev.perl [deleted file]
installer/data/mysql/updatedatabase.pl

diff --git a/Koha.pm b/Koha.pm
index d77d4ed..1f5e7a9 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 = "16.06.00.022";
+$VERSION = "16.06.00.023";
 
 sub version {
     return $VERSION;
diff --git a/installer/data/mysql/atomicupdate/Bug_17187_dbrev.perl b/installer/data/mysql/atomicupdate/Bug_17187_dbrev.perl
deleted file mode 100644 (file)
index 0edffcf..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-#!/usr/bin/perl
-
-use Modern::Perl;
-use C4::Context;
-
-my $dbh = C4::Context->dbh;
-my $DBversion = 'XXX';
-
-# @RM: Copy from here
-
-#if ( CheckVersion($DBversion) ) {
-if ( 1 ) { #FIXME
-    my $pref = C4::Context->preference('timeout');
-    if( !$pref || $pref eq '12000000' ) {
-        # update if pref is null or equals old default value
-        $dbh->do(q|
-UPDATE systempreferences SET value = '1d', type = 'Free'
-WHERE variable = 'timeout'
-        |);
-        print "Upgrade to $DBversion done (Bug 17187)\nNote: Pref value for timeout has been adjusted.\n";
-    } else {
-        # only update pref type
-        $dbh->do(q|
-UPDATE systempreferences SET type = 'Free'
-WHERE variable = 'timeout'
-        |);
-        print "Upgrade to $DBversion done (Bug 17187)\nNote: Pref value for timeout has not been adjusted.\n";
-    }
-    #SetVersion($DBversion); #FIXME
-}
index 54a29a1..deab87a 100755 (executable)
@@ -12926,6 +12926,27 @@ if ( CheckVersion($DBversion) ) {
     SetVersion($DBversion);
 }
 
+$DBversion = "16.06.00.023";
+if ( CheckVersion($DBversion) ) {
+    my $pref = C4::Context->preference('timeout');
+    if( !$pref || $pref eq '12000000' ) {
+        # update if pref is null or equals old default value
+        $dbh->do(q|
+            UPDATE systempreferences SET value = '1d', type = 'Free'
+            WHERE variable = 'timeout'
+        |);
+        print "Upgrade to $DBversion done (Bug 17187)\nNote: Pref value for timeout has been adjusted.\n";
+    } else {
+        # only update pref type
+        $dbh->do(q|
+            UPDATE systempreferences SET type = 'Free'
+            WHERE variable = 'timeout'
+        |);
+        print "Upgrade to $DBversion done (Bug 17187)\nNote: Pref value for timeout has not been adjusted.\n";
+    }
+    SetVersion($DBversion); #FIXME
+}
+
 # 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.