From 459c8092434bfd90c751a3dfbe6af0c9987aa66b Mon Sep 17 00:00:00 2001 From: Magnus Enger Date: Wed, 13 Feb 2013 13:43:22 +0100 Subject: [PATCH 1/3] Bug 9498 - Update encoding for Norwegian sample Z39.50 servers This patch - Updates the sample servers installed by the web installer - Does a database upgrade that changes the encoding for the servers in question To test: - Do a Norwegian installation and make sure to choose the optional sample Z39.50 targets - Check that encodings for the Norwegian targets (BIBSYS, SAMBOK, NORBOK and DEICHMAN) are all set to ISO_6937 (which is the wrong encoding) - Apply this patch and make sure updatadatabase.pl is run - Check that the encoding for the four targets mentioned above are now ISO_8859-1 - Do one search against each target and check that there are no "strange" chars in the result list. Searching each of the targets for "hessen" should give results that include "norwegian vowels" - Log on to the MySQL of the test installation and empty the table of Z39.50 targets: mysql> delete from z3950servers; - Load this file into MySQL from the command line: installer/data/mysql/nb-NO/2-Valgfritt/z3950servers.sql and check that it loads without errors and that the four Norwegian targets are still set to have encoding = ISO_8859-1 Signed-off-by: Bernardo Gonzalez Kriegel Comment: Work as described. No errors. No koha-qa errors Passed-QA-by: Marcel de Rooy Signed-off-by: Jared Camins-Esakov --- installer/data/mysql/nb-NO/2-Valgfritt/z3950servers.sql | 8 ++++---- installer/data/mysql/updatedatabase.pl | 9 +++++++++ 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/installer/data/mysql/nb-NO/2-Valgfritt/z3950servers.sql b/installer/data/mysql/nb-NO/2-Valgfritt/z3950servers.sql index 7bba81bdea..b1af0f3f8e 100644 --- a/installer/data/mysql/nb-NO/2-Valgfritt/z3950servers.sql +++ b/installer/data/mysql/nb-NO/2-Valgfritt/z3950servers.sql @@ -1,6 +1,6 @@ INSERT INTO z3950servers (host, port, db, userid, password, name, id, checked, rank, syntax, timeout, icon, position, type, encoding, description) VALUES ('lx2.loc.gov',210,'LCDB','','','LIBRARY OF CONGRESS',1,0,0,'USMARC',0,NULL,'primary','zed','utf8',''), -('z3950.bibsys.no',2100,'BIBSYS','','','BIBSYS',12,1,1,'NORMARC',0,NULL,'primary','zed','ISO_6937',''), -('z3950.nb.no',2100,'Norbok','','','NORBOK',13,0,0,'NORMARC',0,NULL,'primary','zed','ISO_6937',''), -('z3950.nb.no',2100,'Sambok','','','SAMBOK',14,0,0,'NORMARC',0,NULL,'primary','zed','ISO_6937',''), -('z3950.deich.folkebibl.no',210,'data','','','DEICHMAN',15,0,0,'NORMARC',0,NULL,'primary','zed','ISO_6937',''); +('z3950.bibsys.no',2100,'BIBSYS','','','BIBSYS',12,1,1,'NORMARC',0,NULL,'primary','zed','ISO_8859-1',''), +('z3950.nb.no',2100,'Norbok','','','NORBOK',13,0,0,'NORMARC',0,NULL,'primary','zed','ISO_8859-1',''), +('z3950.nb.no',2100,'Sambok','','','SAMBOK',14,0,0,'NORMARC',0,NULL,'primary','zed','ISO_8859-1',''), +('z3950.deich.folkebibl.no',210,'data','','','DEICHMAN',15,0,0,'NORMARC',0,NULL,'primary','zed','ISO_8859-1',''); diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index a3f31a738c..b2b8d0d3bf 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -6748,6 +6748,15 @@ if ( CheckVersion($DBversion) ) { SetVersion ($DBversion); } +$DBversion = "3.11.00.XXX"; +if ( CheckVersion($DBversion) ) { + $dbh->do("UPDATE z3950servers SET encoding = 'ISO_8859-1' WHERE name = 'BIBSYS'"); + $dbh->do("UPDATE z3950servers SET encoding = 'ISO_8859-1' WHERE name = 'NORBOK'"); + $dbh->do("UPDATE z3950servers SET encoding = 'ISO_8859-1' WHERE name = 'SAMBOK'"); + $dbh->do("UPDATE z3950servers SET encoding = 'ISO_8859-1' WHERE name = 'DEICHMAN'"); + print "Upgrade to $DBversion done (Bug 9498 - Update encoding for Norwegian sample Z39.50 servers)\n"; + SetVersion($DBversion); +} =head1 FUNCTIONS From 65283eb2bd9bc3ee708f1eb8aa88655617dcf346 Mon Sep 17 00:00:00 2001 From: Marcel de Rooy Date: Wed, 27 Mar 2013 13:20:47 +0100 Subject: [PATCH 2/3] Bug 9498 QA Followup for updatedatabase Signed-off-by: Marcel de Rooy Signed-off-by: Bernardo Gonzalez Kriegel Small followup to update servers. No errors Signed-off-by: Jared Camins-Esakov --- installer/data/mysql/updatedatabase.pl | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index b2b8d0d3bf..4557c20c5c 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -6750,10 +6750,10 @@ if ( CheckVersion($DBversion) ) { $DBversion = "3.11.00.XXX"; if ( CheckVersion($DBversion) ) { - $dbh->do("UPDATE z3950servers SET encoding = 'ISO_8859-1' WHERE name = 'BIBSYS'"); - $dbh->do("UPDATE z3950servers SET encoding = 'ISO_8859-1' WHERE name = 'NORBOK'"); - $dbh->do("UPDATE z3950servers SET encoding = 'ISO_8859-1' WHERE name = 'SAMBOK'"); - $dbh->do("UPDATE z3950servers SET encoding = 'ISO_8859-1' WHERE name = 'DEICHMAN'"); + $dbh->do("UPDATE z3950servers SET encoding = 'ISO_8859-1' WHERE name = 'BIBSYS' AND host LIKE 'z3950.bibsys.no'"); + $dbh->do("UPDATE z3950servers SET encoding = 'ISO_8859-1' WHERE name = 'NORBOK' AND host LIKE 'z3950.nb.no'"); + $dbh->do("UPDATE z3950servers SET encoding = 'ISO_8859-1' WHERE name = 'SAMBOK' AND host LIKE 'z3950.nb.no'"); + $dbh->do("UPDATE z3950servers SET encoding = 'ISO_8859-1' WHERE name = 'DEICHMAN' AND host like 'z3950.deich.folkebibl.no'"); print "Upgrade to $DBversion done (Bug 9498 - Update encoding for Norwegian sample Z39.50 servers)\n"; SetVersion($DBversion); } From 44a9916303567352a7b215f039b0d47a08ed846a Mon Sep 17 00:00:00 2001 From: Jared Camins-Esakov Date: Sat, 30 Mar 2013 22:52:50 -0400 Subject: [PATCH 3/3] Bug 9498: Increment version number Database update for bug 9498 has been given version 3.11.00.201 --- installer/data/mysql/updatedatabase.pl | 2 +- kohaversion.pl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index 4557c20c5c..bc8375a24e 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -6748,7 +6748,7 @@ if ( CheckVersion($DBversion) ) { SetVersion ($DBversion); } -$DBversion = "3.11.00.XXX"; +$DBversion = "3.11.00.201"; if ( CheckVersion($DBversion) ) { $dbh->do("UPDATE z3950servers SET encoding = 'ISO_8859-1' WHERE name = 'BIBSYS' AND host LIKE 'z3950.bibsys.no'"); $dbh->do("UPDATE z3950servers SET encoding = 'ISO_8859-1' WHERE name = 'NORBOK' AND host LIKE 'z3950.nb.no'"); diff --git a/kohaversion.pl b/kohaversion.pl index f962169ccf..3372b8d387 100644 --- a/kohaversion.pl +++ b/kohaversion.pl @@ -16,7 +16,7 @@ the kohaversion is divided in 4 parts : use strict; sub kohaversion { - our $VERSION = '3.11.00.200'; + our $VERSION = '3.11.00.201'; # version needs to be set this way # so that it can be picked up by Makefile.PL # during install