prefer CheckVersion in updatedatabase.pl
authorGalen Charlton <gmc@esilibrary.com>
Wed, 22 May 2013 18:57:33 +0000 (11:57 -0700)
committerGalen Charlton <gmc@esilibrary.com>
Wed, 22 May 2013 18:57:33 +0000 (11:57 -0700)
Fixes an inconsistency with a couple recent
DBrev patches.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
installer/data/mysql/updatedatabase.pl

index b41e88b..13de229 100755 (executable)
@@ -6840,13 +6840,13 @@ if ( CheckVersion($DBversion) ) {
 }
 
 $DBversion = '3.13.00.000';
-if (C4::Context->preference("Version") < TransformToNum($DBversion)) {
+if ( CheckVersion($DBversion) ) {
     print "Upgrade to $DBversion done (start the journey to Koha Pi)\n";
     SetVersion ($DBversion);
 }
 
 $DBversion = "3.13.00.001";
-if ( C4::Context->preference("Version") < TransformToNum($DBversion) ) {
+if ( CheckVersion($DBversion) ) {
     $dbh->do("INSERT INTO `systempreferences` (`variable`, `value`, `options`, `explanation`, `type`) VALUES ('UseCourseReserves', '0', NULL, 'Enable the course reserves feature.', 'YesNo')");
     $dbh->do("INSERT INTO userflags (bit,flag,flagdesc,defaulton) VALUES ('18','coursereserves','Course Reserves','0')");
     $dbh->do("