From c1ed403b00594e3fad34e1c34d0c26e417e76ae2 Mon Sep 17 00:00:00 2001 From: Paul POULAIN Date: Fri, 14 Dec 2007 09:41:00 +0100 Subject: [PATCH] regexp-ing $marcflavour to handle unimarc_xxxxx or marc21_yyyy subdirectories see previous commit, about having 2 different sets of UNIMARC. Signed-off-by: Joshua Ferraro --- installer/install.pl | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/installer/install.pl b/installer/install.pl index 91a5b01d83..11762c500d 100755 --- a/installer/install.pl +++ b/installer/install.pl @@ -403,10 +403,14 @@ elsif ( $step && $step == 3 ) { my $langchoice = $query->param('fwklanguage'); $langchoice = $query->cookie('KohaOpacLanguage') unless ($langchoice); my $marcflavour = $query->param('marcflavour'); - if ($marcflavour){ + if ($marcflavour){ + # we can have some variants of marc flavour, by having different directories, like : unimarc_small and unimarc_full, for small and complete unimarc frameworks. + # marc_cleaned finds the marcflavour, without the variant. + my $marc_cleaned = 'MARC21'; + $marc_cleaned = 'UNIMARC' if $marcflavour =~ /unimarc/; my $request = $dbh->prepare( - "INSERT IGNORE INTO `systempreferences` (variable,value,explanation,options,type) VALUES('marcflavour','$marcflavour','Define global MARC flavor (MARC21 or UNIMARC) used for character encoding','MARC21|UNIMARC','Choice');" + "INSERT IGNORE INTO `systempreferences` (variable,value,explanation,options,type) VALUES('marcflavour','$marc_cleaned','Define global MARC flavor (MARC21 or UNIMARC) used for character encoding','MARC21|UNIMARC','Choice');" ); $request->execute; }; -- 2.39.5