From 84a3153fc475ce67949c5b500b445203335809ed Mon Sep 17 00:00:00 2001 From: Henri-Damien LAURENT Date: Tue, 30 Oct 2007 13:02:35 -0500 Subject: [PATCH] Minor changes to keep behaviour unchanged if no marcflavour directory. Signed-off-by: Chris Cormack Signed-off-by: Joshua Ferraro --- installer/install.pl | 17 ++++++++--------- .../prog/en/modules/installer/step3.tmpl | 2 ++ 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/installer/install.pl b/installer/install.pl index ede3ecca84..a58724965e 100755 --- a/installer/install.pl +++ b/installer/install.pl @@ -373,13 +373,15 @@ elsif ( $step && $step == 3 ) { my $langchoice = $query->param('fwklanguage'); $langchoice = $query->cookie('KohaOpacLanguage') unless ($langchoice); my $marcflavour = $query->param('marcflavour'); + if ($marcflavour){ + 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');" + ); + $request->execute; + }; $marcflavour = C4::Context->preference('marcflavour') unless ($marcflavour); #Insert into database the selected marcflavour - my $request = - $dbh->prepare( - "INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('marcflavour','$marcflavour','Define global MARC flavor (MARC21 or UNIMARC) used for character encoding','MARC21|UNIMARC','Choice');" - ); - $request->execute; undef $/; my $dir = @@ -396,10 +398,10 @@ elsif ( $step && $step == 3 ) { $request->execute; my ($frameworksloaded) = $request->fetchrow; my %frameworksloaded; - foreach ( split( /\|/, $frameworksloaded ) ) { $frameworksloaded{$_} = 1; } + foreach my $requirelevel (@listdir) { opendir( MYDIR, "$dir/$requirelevel" ); my @listname = @@ -447,9 +449,6 @@ elsif ( $step && $step == 3 ) { @listdir = sort grep { !/^\.|CVS|marcflavour/ && -d "$dir/$_" } readdir(MYDIR); closedir MYDIR; my @levellist; - foreach ( split( /\|/, $frameworksloaded ) ) { - $frameworksloaded{$_} = 1; - } foreach my $requirelevel (@listdir) { opendir( MYDIR, "$dir/$requirelevel" ); my @listname = diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/installer/step3.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/installer/step3.tmpl index b291822235..203e9871e6 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/installer/step3.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/installer/step3.tmpl @@ -106,6 +106,7 @@ +

MARC Frameworks:

@@ -130,6 +131,7 @@

Other data

+

-- 2.39.5