Merge branch 'new/bug_6629'

This commit is contained in:
Paul Poulain 2011-11-28 09:46:23 +01:00
commit 2989e12288
2 changed files with 12 additions and 8 deletions

View file

@ -117,7 +117,7 @@ sub get_template_and_user {
$tmplbase=~ s/\.tmpl$/.tt/;
my $filename = "$path/modules/" . $tmplbase;
my $interface = 'intranet';
my $template = C4::Templates->new( $interface, $filename, $tmplbase);
my $template = C4::Templates->new( $interface, $filename, $tmplbase, $query);
my ( $user, $cookie, $sessionID, $flags ) = checkauth(
$in->{'query'},
@ -158,11 +158,13 @@ sub get_template_and_user {
}
sub _get_template_language {
#verify if opac language exists in staff (bug 5660)
#conditions are 1) dir exists and 2) enabled in prefs
my ($opaclang)= @_;
my ($opaclang) = @_;
return 'en' unless $opaclang;
my $path= C4::Context->config('intrahtdocs')."/prog/$opaclang";
$opaclang =~ s/[^a-zA-Z_-]*//g;
my $path = C4::Context->config('intrahtdocs') . "/prog/$opaclang";
-d $path ? $opaclang : 'en';
}
@ -365,7 +367,7 @@ sub checkauth {
my $filename = "$path/modules/$template_name";
$filename =~ s/\.tmpl$/.tt/;
my $interface = 'intranet';
my $template = C4::Templates->new( $interface, $filename);
my $template = C4::Templates->new( $interface, $filename, '', $query);
$template->param(
INPUTS => \@inputs,

View file

@ -229,6 +229,7 @@ elsif ( $step && $step == 3 ) {
# Framework Selection is achieved through checking boxes.
my $langchoice = $query->param('fwklanguage');
$langchoice = $query->cookie('KohaOpacLanguage') unless ($langchoice);
$langchoice =~ s/[^a-zA-Z_-]*//g;
my $marcflavour = $query->param('marcflavour');
if ($marcflavour){
$installer->set_marcflavour_syspref($marcflavour);
@ -266,6 +267,7 @@ elsif ( $step && $step == 3 ) {
# Marcflavour Selection is achieved through radiobuttons.
my $langchoice = $query->param('fwklanguage');
$langchoice = $query->cookie('KohaOpacLanguage') unless ($langchoice);
$langchoice =~ s/[^a-zA-Z_-]*//g;
my $dir =
C4::Context->config('intranetdir') . "/installer/data/$info{dbms}/$langchoice/marcflavour";
unless (opendir( MYDIR, $dir )) {