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.
This commit is contained in:
tipaul 2002-12-10 15:52:49 +00:00
parent afe757aeca
commit b0d0dddfac
2 changed files with 4 additions and 4 deletions

View file

@ -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;

View file

@ -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');