[Patches] [PATCH] Add MARC21 field 545 to to framework fix bug 5226

koha-patchbot at kohaaloha.com koha-patchbot at kohaaloha.com
Thu Dec 8 10:30:02 NZDT 2011


From: Jared Camins-Esakov <jcamins at cpbibliography.com>
Date: Mon, 1 Nov 2010 23:08:24 -0400
Subject: [PATCH] Add MARC21 field 545 to to framework fix bug 5226

Adds MARC21 field 545 to the English, French, German, and Polish MARC21
frameworks. The labels for the field still need to be translated into
French and Polish.

Signed-off-by: Chris Cormack <chrisc at catalyst.net.nz>
---
 .../marc21/mandatory/marc21_framework_DEFAULT.sql  |    1 +
 .../marc21/mandatory/marc21_framework_DEFAULT.sql  |    1 +
 .../Obligatoire/marc21_framework_DEFAULT.sql       |    1 +
 .../marc21/mandatory/marc21_framework_DEFAULT.sql  |    1 +
 installer/data/mysql/updatedatabase.pl             |   14 ++++++++++++++
 5 files changed, 18 insertions(+), 0 deletions(-)

diff --git a/installer/data/mysql/de-DE/marcflavour/marc21/mandatory/marc21_framework_DEFAULT.sql b/installer/data/mysql/de-DE/marcflavour/marc21/mandatory/marc21_framework_DEFAULT.sql
index aa5390f..cbd9f03 100644
--- a/installer/data/mysql/de-DE/marcflavour/marc21/mandatory/marc21_framework_DEFAULT.sql
+++ b/installer/data/mysql/de-DE/marcflavour/marc21/mandatory/marc21_framework_DEFAULT.sql
@@ -347,6 +347,7 @@ INSERT INTO `marc_tag_structure` (`tagfield`, `liblibrarian`, `libopac`, `repeat
 		('541', 'Fußnote zur Herkunft', 'Fußnote zur Herkunft', 1, 0, NULL, ''),
 		('543', 'SOLICITATION INFORMATION NOTE (AM) [OBSOLETE]', 'SOLICITATION INFORMATION NOTE (AM) [OBSOLETE]', 1, 0, NULL, ''),
 		('544', 'Fußnote zum Standort anderer Archivmaterialien', 'Fußnote zum Standort anderer Archivmaterialien', 1, 0, NULL, ''),
+        ('545', 'Fußnote zu biografischen oder historischen Daten', 'Fußnote zu biografischen oder historischen Daten', 1, 0, NULL, ''),
 		('546', 'Fußnote zur Sprache', 'Fußnote zur Sprache', 1, 0, NULL, ''),
 		('547', 'Fußnote zu früheren Titeln', 'Fußnote zu früheren Titeln', 1, 0, NULL, ''),
 		('550', 'Fußnote zur herausgebenden Körperschaft', 'Fußnote zur herausgebenden Körperschaft', 1, 0, NULL, ''),
diff --git a/installer/data/mysql/en/marcflavour/marc21/mandatory/marc21_framework_DEFAULT.sql b/installer/data/mysql/en/marcflavour/marc21/mandatory/marc21_framework_DEFAULT.sql
index 8e817ff..59c4db0 100644
--- a/installer/data/mysql/en/marcflavour/marc21/mandatory/marc21_framework_DEFAULT.sql
+++ b/installer/data/mysql/en/marcflavour/marc21/mandatory/marc21_framework_DEFAULT.sql
@@ -347,6 +347,7 @@ INSERT INTO `marc_tag_structure` (`tagfield`, `liblibrarian`, `libopac`, `repeat
 		('541', 'IMMEDIATE SOURCE OF ACQUISITION NOTE', 'IMMEDIATE SOURCE OF ACQUISITION NOTE', 1, 0, NULL, ''),
 		('543', 'SOLICITATION INFORMATION NOTE (AM) [OBSOLETE]', 'SOLICITATION INFORMATION NOTE (AM) [OBSOLETE]', 1, 0, NULL, ''),
 		('544', 'LOCATION OF OTHER ARCHIVAL MATERIALS NOTE', 'LOCATION OF OTHER ARCHIVAL MATERIALS NOTE', 1, 0, NULL, ''),
+        ('545', 'BIOGRAPHICAL OR HISTORICAL DATA', 'BIOGRAPHICAL OR HISTORICAL DATA', 1, 0, NULL, ''),
 		('546', 'LANGUAGE NOTE', 'LANGUAGE NOTE', 1, 0, NULL, ''),
 		('547', 'FORMER TITLE COMPLEXITY NOTE', 'FORMER TITLE COMPLEXITY NOTE', 1, 0, NULL, ''),
 		('550', 'ISSUING BODY NOTE', 'ISSUING BODY NOTE', 1, 0, NULL, ''),
diff --git a/installer/data/mysql/fr-FR/marcflavour/marc21/Obligatoire/marc21_framework_DEFAULT.sql b/installer/data/mysql/fr-FR/marcflavour/marc21/Obligatoire/marc21_framework_DEFAULT.sql
index bda6735..a5212ab 100644
--- a/installer/data/mysql/fr-FR/marcflavour/marc21/Obligatoire/marc21_framework_DEFAULT.sql
+++ b/installer/data/mysql/fr-FR/marcflavour/marc21/Obligatoire/marc21_framework_DEFAULT.sql
@@ -347,6 +347,7 @@ INSERT INTO `marc_tag_structure` (`tagfield`, `liblibrarian`, `libopac`, `repeat
 		('541', 'IMMEDIATE SOURCE OF ACQUISITION NOTE', 'IMMEDIATE SOURCE OF ACQUISITION NOTE', 1, 0, NULL, ''),
 		('543', 'SOLICITATION INFORMATION NOTE (AM) [OBSOLETE]', 'SOLICITATION INFORMATION NOTE (AM) [OBSOLETE]', 1, 0, NULL, ''),
 		('544', 'LOCATION OF OTHER ARCHIVAL MATERIALS NOTE', 'LOCATION OF OTHER ARCHIVAL MATERIALS NOTE', 1, 0, NULL, ''),
+        ('545', 'BIOGRAPHICAL OR HISTORICAL DATA', 'BIOGRAPHICAL OR HISTORICAL DATA', 1, 0, NULL, ''),
 		('546', 'LANGUAGE NOTE', 'LANGUAGE NOTE', 1, 0, NULL, ''),
 		('547', 'FORMER TITLE COMPLEXITY NOTE', 'FORMER TITLE COMPLEXITY NOTE', 1, 0, NULL, ''),
 		('550', 'ISSUING BODY NOTE', 'ISSUING BODY NOTE', 1, 0, NULL, ''),
diff --git a/installer/data/mysql/pl-PL/marcflavour/marc21/mandatory/marc21_framework_DEFAULT.sql b/installer/data/mysql/pl-PL/marcflavour/marc21/mandatory/marc21_framework_DEFAULT.sql
index e79cb33..1721533 100644
--- a/installer/data/mysql/pl-PL/marcflavour/marc21/mandatory/marc21_framework_DEFAULT.sql
+++ b/installer/data/mysql/pl-PL/marcflavour/marc21/mandatory/marc21_framework_DEFAULT.sql
@@ -346,6 +346,7 @@ INSERT INTO `marc_tag_structure` (`tagfield`, `liblibrarian`, `libopac`, `repeat
 		('541','ACQUISITION INFO--IMMEDIATE SOURCE OF ACQUISITION NOTE','IMMEDIATE SOURCE OF ACQUISITION NOTE',1,0,NULL,''),
 		('543','SOLICITATION INFORMATION NOTE (AM) [OBSOLETE]','SOLICITATION INFORMATION NOTE (AM) [OBSOLETE]',1,0,NULL,''),
 		('544','LOCATION OF OTHER ARCHIVAL MATERIALS NOTE','LOCATION OF OTHER ARCHIVAL MATERIALS NOTE',1,0,NULL,''),
+        ('545', 'BIOGRAPHICAL OR HISTORICAL DATA', 'BIOGRAPHICAL OR HISTORICAL DATA', 1, 0, NULL, ''),
 		('546','UWAGA O JĘZYKU','LANGUAGE NOTE',1,0,NULL,''),
 		('547','ZŁOŻONA UWAGA O POPRZEDNIM TYTULE','FORMER TITLE COMPLEXITY NOTE',1,0,NULL,''),
 		('550','UWAGA DOTYCZĄCA INSTYTUCJI SPRAWCZEJ','ISSUING BODY NOTE',1,0,NULL,''),
diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl
index b5f96ef..f4cabb4 100755
--- a/installer/data/mysql/updatedatabase.pl
+++ b/installer/data/mysql/updatedatabase.pl
@@ -4578,6 +4578,20 @@ if ( C4::Context->preference("Version") < TransformToNum($DBversion) ) {
     SetVersion($DBversion);
 }
 
+$DBversion = '3.07.00.XXX';
+if (C4::Context->preference("Version") < TransformToNum($DBversion)) {
+    if (C4::Context->preference("marcflavour") eq 'MARC21') {
+        if (C4::Context->preference("opaclanguages") eq "de") {
+            $dbh->do("INSERT INTO `marc_tag_structure` (`tagfield`, `liblibrarian`, `libopac`, `repeatable`, `mandatory`, `authorised_value`, `frameworkcode`) VALUES ('545', 'Fußnote zu biografischen oder historischen Daten', 'Fußnote zu biografischen oder historischen Daten', 1, 0, NULL, '');");
+        } else {
+            $dbh->do("INSERT INTO `marc_tag_structure` (`tagfield`, `liblibrarian`, `libopac`, `repeatable`, `mandatory`, `authorised_value`, `frameworkcode`) VALUES ('545', 'BIOGRAPHICAL OR HISTORICAL DATA', 'BIOGRAPHICAL OR HISTORICAL DATA', 1, 0, NULL, '');");
+        }
+    }
+    print "Upgrade to $DBversion done (add MARC21 field 545 to framework)\n";
+    SetVersion ($DBversion);
+}
+
+
 =head1 FUNCTIONS
 
 =head2 DropAllForeignKeys($table)
-- 
1.7.5.4


More information about the Patches mailing list