Bug 8207 follow-up: correct typo in authority types
authorJared Camins-Esakov <jcamins@cpbibliography.com>
Thu, 23 Aug 2012 13:23:50 +0000 (09:23 -0400)
committerPaul Poulain <paul.poulain@biblibre.com>
Mon, 3 Sep 2012 10:44:34 +0000 (12:44 +0200)
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
installer/data/mysql/updatedatabase.pl
kohaversion.pl

index 99610d7..6eb9c74 100755 (executable)
@@ -5569,8 +5569,8 @@ if (C4::Context->preference("Version") < TransformToNum($DBversion)) {
 $DBversion = "3.09.00.028";
 if (C4::Context->preference("Version") < TransformToNum($DBversion)) {
     unless ( C4::Context->preference('marcflavour') eq 'UNIMARC' ) {
-        my %referencetypes = (  '00' => 'PERSO_CODE',
-                                '10' => 'ORGO_CODE',
+        my %referencetypes = (  '00' => 'PERSO_NAME',
+                                '10' => 'CORPO_NAME',
                                 '11' => 'MEETI_NAME',
                                 '30' => 'UNIF_TITLE',
                                 '48' => 'CHRON_TERM',
@@ -5664,6 +5664,14 @@ if ( C4::Context->preference("Version") < TransformToNum($DBversion) ) {
    SetVersion ($DBversion);
 }
 
+$DBversion ="3.09.00.034";
+if(C4::Context->preference("Version") < TransformToNum($DBversion) ) {
+    $dbh->do("UPDATE auth_subfield_structure SET frameworkcode = 'PERSO_NAME' WHERE frameworkcode = 'PERSO_CODE'");
+    $dbh->do("UPDATE auth_subfield_structure SET frameworkcode = 'CORPO_NAME' WHERE frameworkcode = 'ORGO_CODE'");
+    print "Upgrade to $DBversion done (Bug 8207: correct typo in authority types)\n";
+    SetVersion($DBversion);
+}
+
 =head1 FUNCTIONS
 
 =head2 TableExists($table)
index f62b794..b58966b 100644 (file)
@@ -16,7 +16,7 @@ the kohaversion is divided in 4 parts :
 use strict;
 
 sub kohaversion {
-    our $VERSION = '3.09.00.033';
+    our $VERSION = '3.09.00.034';
     # version needs to be set this way
     # so that it can be picked up by Makefile.PL
     # during install