From 893a3ff6ca2487ae9506cddc1e538f6d0785a3d3 Mon Sep 17 00:00:00 2001 From: Sonia LEMAIRE Date: Wed, 3 Jul 2013 15:53:49 +0200 Subject: [PATCH] Bug 9519: fix code for Italian language search limiter 'ind' rather than 'ita' was set as the ISO639-2 language code for Italian in the fr-FR, it-IT, pl-PL, ru-RU, and uk-UA installation SQL. Signed-off-by: Chris Cormack Signed-off-by: Katrin Fischer I checked nb-NO and de-DE - language code there had already been corrected. Signed-off-by: Galen Charlton (cherry picked from commit 707733ed2992a5d612d22510174301d65d3d7c05) Conflicts: installer/data/mysql/updatedatabase.pl Trivial merge conflict in the usual suspect, updatedatabase.pl Signed-off-by: Tomas Cohen Arazi (cherry picked from commit 645e80d58783aed46f368e36156ea69e2a34779e) Conflicts: installer/data/mysql/updatedatabase.pl Solved merge conflict Signed-off-by: Bernardo Gonzalez Kriegel (cherry picked from commit 645e80d58783aed46f368e36156ea69e2a34779e) Conflicts: installer/data/mysql/updatedatabase.pl Signed-off-by: Chris Hall (cherry picked from commit 1140e9c46af8522373ec51fc6282bfc7c4936540) --- .../data/mysql/fr-FR/1-Obligatoire/subtag_registry.sql | 2 +- installer/data/mysql/it-IT/necessari/subtag_registry.sql | 2 +- installer/data/mysql/pl-PL/mandatory/subtag_registry.sql | 2 +- installer/data/mysql/ru-RU/mandatory/subtag_registry.sql | 2 +- installer/data/mysql/uk-UA/mandatory/subtag_registry.sql | 2 +- installer/data/mysql/updatedatabase.pl | 7 +++++++ kohaversion.pl | 2 +- 7 files changed, 13 insertions(+), 6 deletions(-) diff --git a/installer/data/mysql/fr-FR/1-Obligatoire/subtag_registry.sql b/installer/data/mysql/fr-FR/1-Obligatoire/subtag_registry.sql index caa354b827..b8f0741807 100644 --- a/installer/data/mysql/fr-FR/1-Obligatoire/subtag_registry.sql +++ b/installer/data/mysql/fr-FR/1-Obligatoire/subtag_registry.sql @@ -273,7 +273,7 @@ INSERT INTO language_subtag_registry( subtag, type, description, added) VALUES ( 'it', 'language', 'Italian','2005-10-16' ); INSERT INTO language_rfc4646_to_iso639(rfc4646_subtag,iso639_2_code) -VALUES( 'it','ind'); +VALUES( 'it','ita'); INSERT INTO language_descriptions(subtag, type, lang, description) VALUES( 'it', 'language', 'it', 'Italiano'); diff --git a/installer/data/mysql/it-IT/necessari/subtag_registry.sql b/installer/data/mysql/it-IT/necessari/subtag_registry.sql index a8029d5336..8024e9cce3 100644 --- a/installer/data/mysql/it-IT/necessari/subtag_registry.sql +++ b/installer/data/mysql/it-IT/necessari/subtag_registry.sql @@ -314,7 +314,7 @@ INSERT INTO language_subtag_registry( subtag, type, description, added) VALUES ( 'it', 'language', 'Italian','2005-10-16' ); INSERT INTO language_rfc4646_to_iso639(rfc4646_subtag,iso639_2_code) -VALUES( 'it','ind'); +VALUES( 'it','ita'); INSERT INTO language_descriptions(subtag, type, lang, description) VALUES( 'it', 'language', 'it', 'Italiano'); diff --git a/installer/data/mysql/pl-PL/mandatory/subtag_registry.sql b/installer/data/mysql/pl-PL/mandatory/subtag_registry.sql index b246a7c10c..3ad6c8f6c0 100644 --- a/installer/data/mysql/pl-PL/mandatory/subtag_registry.sql +++ b/installer/data/mysql/pl-PL/mandatory/subtag_registry.sql @@ -312,7 +312,7 @@ INSERT INTO language_subtag_registry( subtag, type, description, added) VALUES ( 'it', 'language', 'Italian','2005-10-16' ); INSERT INTO language_rfc4646_to_iso639(rfc4646_subtag,iso639_2_code) -VALUES( 'it','ind'); +VALUES( 'it','ita'); INSERT INTO language_descriptions(subtag, type, lang, description) VALUES( 'it', 'language', 'it', 'Italiano'); diff --git a/installer/data/mysql/ru-RU/mandatory/subtag_registry.sql b/installer/data/mysql/ru-RU/mandatory/subtag_registry.sql index 4121a59f10..2ebfb03ad5 100644 --- a/installer/data/mysql/ru-RU/mandatory/subtag_registry.sql +++ b/installer/data/mysql/ru-RU/mandatory/subtag_registry.sql @@ -312,7 +312,7 @@ INSERT INTO language_subtag_registry( subtag, type, description, added) VALUES ( 'it', 'language', 'Italian','2005-10-16' ); INSERT INTO language_rfc4646_to_iso639(rfc4646_subtag,iso639_2_code) -VALUES( 'it','ind'); +VALUES( 'it','ita'); INSERT INTO language_descriptions(subtag, type, lang, description) VALUES( 'it', 'language', 'it', 'Italiano'); diff --git a/installer/data/mysql/uk-UA/mandatory/subtag_registry.sql b/installer/data/mysql/uk-UA/mandatory/subtag_registry.sql index 4121a59f10..2ebfb03ad5 100644 --- a/installer/data/mysql/uk-UA/mandatory/subtag_registry.sql +++ b/installer/data/mysql/uk-UA/mandatory/subtag_registry.sql @@ -312,7 +312,7 @@ INSERT INTO language_subtag_registry( subtag, type, description, added) VALUES ( 'it', 'language', 'Italian','2005-10-16' ); INSERT INTO language_rfc4646_to_iso639(rfc4646_subtag,iso639_2_code) -VALUES( 'it','ind'); +VALUES( 'it','ita'); INSERT INTO language_descriptions(subtag, type, lang, description) VALUES( 'it', 'language', 'it', 'Italiano'); diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index 46f90e0bea..da64f669d7 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -5379,6 +5379,13 @@ if ( C4::Context->preference("Version") < TransformToNum($DBversion) ) { SetVersion($DBversion); } +$DBversion = "3.08.16.001"; +if ( C4::Context->preference("Version") < TransformToNum($DBversion) ) { + $dbh->do("UPDATE language_rfc4646_to_iso639 SET iso639_2_code='ita' WHERE rfc4646_subtag='it'"); + print "Upgrade to $DBversion done (Bug 9519: Wrong language code for Italian in the advanced search language limitations)\n"; + SetVersion($DBversion); +} + =head1 FUNCTIONS =head2 TableExists($table) diff --git a/kohaversion.pl b/kohaversion.pl index cc65f09d14..e1ef7dffc1 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.08.16.000'; + our $VERSION = '3.08.16.001'; # version needs to be set this way # so that it can be picked up by Makefile.PL # during install -- 2.39.5