From b0d0dddfacc37ea053b72047f25d56056f48f382 Mon Sep 17 00:00:00 2001 From: tipaul Date: Tue, 10 Dec 2002 15:52:49 +0000 Subject: [PATCH] authentification bugfix : the api in pod-auth.pm has "type => 'opac' "parameter. If called from intranet, should be type => 'intranet'. Output.pm checked for type existed, and not it's value. Now, Output compares checks for type value. If type='intranet', then the intranet template is called, else it's an opac template. Finlay, please validate this commit. --- C4/Auth.pm | 6 +++--- C4/Output.pm | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/C4/Auth.pm b/C4/Auth.pm index 8a6978c902..cba4932310 100644 --- a/C4/Auth.pm +++ b/C4/Auth.pm @@ -75,7 +75,7 @@ C4::Auth - Authenticates Koha users =item get_template_and_user - my ($template, $borrowernumber, $cookie) + my ($template, $borrowernumber, $cookie) = get_template_and_user({template_name => "opac-main.tmpl", query => $query, type => "opac", @@ -115,7 +115,7 @@ sub get_template_and_user { my ($borr, $flags) = getpatroninformation(undef, $borrowernumber); my @bordat; $bordat[0] = $borr; - + $template->param(USER_INFO => \@bordat); } return ($template, $borrowernumber, $cookie); @@ -179,7 +179,7 @@ sub checkauth { $template_name = "opac-auth.tmpl"; } else { $template_name = "auth.tmpl"; - } + } # state variables my $loggedin = 0; diff --git a/C4/Output.pm b/C4/Output.pm index 3f5755721c..5436dcaf54 100644 --- a/C4/Output.pm +++ b/C4/Output.pm @@ -81,7 +81,7 @@ sub gettemplate { my ($tmplbase, $opac) = @_; my $htdocs; - if ($opac) { + if ($opac ne "intranet") { $htdocs = C4::Context->config('opachtdocs'); } else { $htdocs = C4::Context->config('intrahtdocs'); -- 2.39.5