From 493d7c30a194e78d0474f9db4824004fa410c879 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Tue, 27 Sep 2016 13:44:13 +0100 Subject: [PATCH] Bug 17216: Move the AV cat list file to the top level This way it will get used for any languages. Signed-off-by: Katrin Fischer Signed-off-by: Brendan Gallagher --- C4/Installer.pm | 3 ++ .../data/mysql/en/mandatory/auth_values.sql | 29 ----------- .../Obligatoire/framework_DEFAULT.sql | 6 +++ .../data/mysql/mandatory/auth_val_cat.sql | 51 +++++++++++++++++++ 4 files changed, 60 insertions(+), 29 deletions(-) create mode 100644 installer/data/mysql/mandatory/auth_val_cat.sql diff --git a/C4/Installer.pm b/C4/Installer.pm index f5af971e58..719e6b2bf7 100644 --- a/C4/Installer.pm +++ b/C4/Installer.pm @@ -301,6 +301,9 @@ sub load_sql_in_order { # Make sure subtag_registry.sql is loaded second my $subtag_registry = C4::Context->config('intranetdir') . "/installer/data/$self->{dbms}/mandatory/subtag_registry.sql"; unshift(@fnames, $subtag_registry); + # Make sure authorised value categories are loaded at the beginning + my $av_cat = C4::Context->config('intranetdir') . "/installer/data/$self->{dbms}/mandatory/auth_val_cat.sql"; + unshift(@fnames, $av_cat); # Make sure the global sysprefs.sql file is loaded first my $globalsysprefs = C4::Context->config('intranetdir') . "/installer/data/$self->{dbms}/sysprefs.sql"; unshift(@fnames, $globalsysprefs); diff --git a/installer/data/mysql/en/mandatory/auth_values.sql b/installer/data/mysql/en/mandatory/auth_values.sql index 74b917d47c..d7fb280625 100644 --- a/installer/data/mysql/en/mandatory/auth_values.sql +++ b/installer/data/mysql/en/mandatory/auth_values.sql @@ -1,31 +1,2 @@ INSERT INTO authorised_values (category,authorised_value,lib,lib_opac) VALUES ('YES_NO','0','No','No'); INSERT INTO authorised_values (category,authorised_value,lib,lib_opac) VALUES ('YES_NO','1','Yes','Yes'); -INSERT IGNORE INTO authorised_value_categories( category_name ) - VALUES - ('Asort1'), - ('Asort2'), - ('Bsort1'), - ('Bsort2'), - ('SUGGEST'), - ('DAMAGED'), - ('LOST'), - ('REPORT_GROUP'), - ('REPORT_SUBGROUP'), - ('DEPARTMENT'), - ('TERM'), - ('SUGGEST_STATUS'), - ('ITEMTYPECAT'); -INSERT IGNORE INTO authorised_value_categories( category_name ) - VALUES - ('branches'), - ('itemtypes'), - ('cn_source'); - -INSERT IGNORE INTO authorised_value_categories( category_name ) - VALUES - ('WITHDRAWN'), - ('RESTRICTED'), - ('NOT_LOAN'), - ('CCODE'), - ('LOC'), - ('STACK'); diff --git a/installer/data/mysql/fr-FR/marcflavour/unimarc_lecture_pub/Obligatoire/framework_DEFAULT.sql b/installer/data/mysql/fr-FR/marcflavour/unimarc_lecture_pub/Obligatoire/framework_DEFAULT.sql index befaeceede..89a48b1f3d 100644 --- a/installer/data/mysql/fr-FR/marcflavour/unimarc_lecture_pub/Obligatoire/framework_DEFAULT.sql +++ b/installer/data/mysql/fr-FR/marcflavour/unimarc_lecture_pub/Obligatoire/framework_DEFAULT.sql @@ -31,6 +31,12 @@ INSERT INTO `biblio_framework` (`frameworkcode`, `frameworktext`) VALUES ('MULT' INSERT INTO `biblio_framework` (`frameworkcode`, `frameworktext`) VALUES ('PERI', 'Périodique'); INSERT INTO `biblio_framework` (`frameworkcode`, `frameworktext`) VALUES ('WEB', 'Ressource web'); +-- +-- Add some AV categories specific to this file +-- + +INSERT IGNORE INTO authorised_value_categories( category_name ) VALUES ('statut'), ('genre'), ('public'), ('local'), ('pcdm'); + -- -- Contenu de la table `marc_tag_structure` -- diff --git a/installer/data/mysql/mandatory/auth_val_cat.sql b/installer/data/mysql/mandatory/auth_val_cat.sql new file mode 100644 index 0000000000..5584a3d280 --- /dev/null +++ b/installer/data/mysql/mandatory/auth_val_cat.sql @@ -0,0 +1,51 @@ +INSERT IGNORE INTO authorised_value_categories( category_name ) + VALUES + (''), + ('Asort1'), + ('Asort2'), + ('Bsort1'), + ('Bsort2'), + ('SUGGEST'), + ('SUGGEST_STATUS'), + ('SUGGEST_FORMAT'), + ('DAMAGED'), + ('LOST'), + ('REPORT_GROUP'), + ('REPORT_SUBGROUP'), + ('DEPARTMENT'), + ('TERM'), + ('ITEMTYPECAT'); +INSERT IGNORE INTO authorised_value_categories( category_name ) + VALUES + ('branches'), + ('itemtypes'), + ('cn_source'); + +INSERT IGNORE INTO authorised_value_categories( category_name ) + VALUES + ('WITHDRAWN'), + ('RESTRICTED'), + ('NOT_LOAN'), + ('CCODE'), + ('LOC'), + ('MANUAL_INV'), + ('BOR_NOTES'), + ('OPAC_SUG'), + ('SIP_MEDIA_TYPE'), + ('ORDER_CANCELLATION_REASON'), + ('RELTERMS'), + ('YES_NO'), + ('LANG'), + ('HINGS_UT'), + ('HINGS_PF'), + ('HINGS_C'), + ('HINGS_AS'), + ('HINGS_RD'), + ('STACK'); + +-- UNIMARC specific? +INSERT IGNORE INTO authorised_value_categories( category_name ) VALUES + ('ETAT'), + ('CAND'), + ('COUNTRY'), + ('qualif'); -- 2.39.5