Bug 5370: Fix all the references to koha.org
[srvgit] / installer / data / mysql / update22to30.pl
index cb4379b..6d5b1cc 100755 (executable)
@@ -4,7 +4,7 @@
 # Database Updater
 # This script checks for required updates to the database.
 
-# Part of the Koha Library Software www.koha.org
+# Part of the Koha Library Software www.koha-community.org
 # Licensed under the GPL.
 
 # Bugs/ToDo:
@@ -3501,7 +3501,7 @@ my $DBversion = "3.00.00.000";
     
     # at last, remove useless fields
     foreach $table ( keys %uselessfields ) {
-        my @fields = split /,/,$uselessfields{$table};
+        my @fields = split (/,/,$uselessfields{$table});
         my $fields;
         my $exists;
         foreach my $fieldtodrop (@fields) {
@@ -3527,11 +3527,14 @@ my $DBversion = "3.00.00.000";
     #
     $sth=$dbh->prepare("ALTER TABLE `aqbookfund` DROP PRIMARY KEY , ADD PRIMARY KEY ( `bookfundid` , `branchcode` ) ;");
     $sth->execute;
+    $sth->finish;
    
     # drop extra key on borrowers.borrowernumber
     $dbh->do("ALTER TABLE borrowers DROP KEY borrowernumber"); 
-
-    $sth->finish;
+    
+    # update enrolmentperiod
+    $dbh->do("UPDATE categories SET enrolmentperiod = enrolmentperiod * 12");
+    
     print "upgrade to Koha 3.0 done\n";
     SetVersion ($DBversion);