Merge branch 'new/bug_6629'
This commit is contained in:
commit
2989e12288
2 changed files with 12 additions and 8 deletions
|
@ -117,7 +117,7 @@ sub get_template_and_user {
|
||||||
$tmplbase=~ s/\.tmpl$/.tt/;
|
$tmplbase=~ s/\.tmpl$/.tt/;
|
||||||
my $filename = "$path/modules/" . $tmplbase;
|
my $filename = "$path/modules/" . $tmplbase;
|
||||||
my $interface = 'intranet';
|
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(
|
my ( $user, $cookie, $sessionID, $flags ) = checkauth(
|
||||||
$in->{'query'},
|
$in->{'query'},
|
||||||
|
@ -158,12 +158,14 @@ sub get_template_and_user {
|
||||||
}
|
}
|
||||||
|
|
||||||
sub _get_template_language {
|
sub _get_template_language {
|
||||||
#verify if opac language exists in staff (bug 5660)
|
|
||||||
#conditions are 1) dir exists and 2) enabled in prefs
|
#verify if opac language exists in staff (bug 5660)
|
||||||
my ($opaclang)= @_;
|
#conditions are 1) dir exists and 2) enabled in prefs
|
||||||
return 'en' unless $opaclang;
|
my ($opaclang) = @_;
|
||||||
my $path= C4::Context->config('intrahtdocs')."/prog/$opaclang";
|
return 'en' unless $opaclang;
|
||||||
-d $path ? $opaclang : 'en';
|
$opaclang =~ s/[^a-zA-Z_-]*//g;
|
||||||
|
my $path = C4::Context->config('intrahtdocs') . "/prog/$opaclang";
|
||||||
|
-d $path ? $opaclang : 'en';
|
||||||
}
|
}
|
||||||
|
|
||||||
=item checkauth
|
=item checkauth
|
||||||
|
@ -365,7 +367,7 @@ sub checkauth {
|
||||||
my $filename = "$path/modules/$template_name";
|
my $filename = "$path/modules/$template_name";
|
||||||
$filename =~ s/\.tmpl$/.tt/;
|
$filename =~ s/\.tmpl$/.tt/;
|
||||||
my $interface = 'intranet';
|
my $interface = 'intranet';
|
||||||
my $template = C4::Templates->new( $interface, $filename);
|
my $template = C4::Templates->new( $interface, $filename, '', $query);
|
||||||
$template->param(
|
$template->param(
|
||||||
INPUTS => \@inputs,
|
INPUTS => \@inputs,
|
||||||
|
|
||||||
|
|
|
@ -229,6 +229,7 @@ elsif ( $step && $step == 3 ) {
|
||||||
# Framework Selection is achieved through checking boxes.
|
# Framework Selection is achieved through checking boxes.
|
||||||
my $langchoice = $query->param('fwklanguage');
|
my $langchoice = $query->param('fwklanguage');
|
||||||
$langchoice = $query->cookie('KohaOpacLanguage') unless ($langchoice);
|
$langchoice = $query->cookie('KohaOpacLanguage') unless ($langchoice);
|
||||||
|
$langchoice =~ s/[^a-zA-Z_-]*//g;
|
||||||
my $marcflavour = $query->param('marcflavour');
|
my $marcflavour = $query->param('marcflavour');
|
||||||
if ($marcflavour){
|
if ($marcflavour){
|
||||||
$installer->set_marcflavour_syspref($marcflavour);
|
$installer->set_marcflavour_syspref($marcflavour);
|
||||||
|
@ -266,6 +267,7 @@ elsif ( $step && $step == 3 ) {
|
||||||
# Marcflavour Selection is achieved through radiobuttons.
|
# Marcflavour Selection is achieved through radiobuttons.
|
||||||
my $langchoice = $query->param('fwklanguage');
|
my $langchoice = $query->param('fwklanguage');
|
||||||
$langchoice = $query->cookie('KohaOpacLanguage') unless ($langchoice);
|
$langchoice = $query->cookie('KohaOpacLanguage') unless ($langchoice);
|
||||||
|
$langchoice =~ s/[^a-zA-Z_-]*//g;
|
||||||
my $dir =
|
my $dir =
|
||||||
C4::Context->config('intranetdir') . "/installer/data/$info{dbms}/$langchoice/marcflavour";
|
C4::Context->config('intranetdir') . "/installer/data/$info{dbms}/$langchoice/marcflavour";
|
||||||
unless (opendir( MYDIR, $dir )) {
|
unless (opendir( MYDIR, $dir )) {
|
||||||
|
|
Loading…
Reference in a new issue