Lines 167-173
sub get_template_and_user {
Link Here
|
167 |
$in->{'query'}, |
167 |
$in->{'query'}, |
168 |
$in->{'authnotrequired'}, |
168 |
$in->{'authnotrequired'}, |
169 |
$in->{'flagsrequired'}, |
169 |
$in->{'flagsrequired'}, |
170 |
$in->{'type'} |
170 |
$in->{'type'}, |
|
|
171 |
undef, |
172 |
$in->{template_name}, |
171 |
); |
173 |
); |
172 |
} |
174 |
} |
173 |
|
175 |
|
Lines 789-797
sub checkauth {
Link Here
|
789 |
my $flagsrequired = shift; |
791 |
my $flagsrequired = shift; |
790 |
my $type = shift; |
792 |
my $type = shift; |
791 |
my $emailaddress = shift; |
793 |
my $emailaddress = shift; |
|
|
794 |
my $template_name = shift; |
792 |
$type = 'opac' unless $type; |
795 |
$type = 'opac' unless $type; |
793 |
|
796 |
|
794 |
$authnotrequired = 0 unless C4::Context->preference("OpacPublic"); |
797 |
unless ( C4::Context->preference("OpacPublic") ) { |
|
|
798 |
my @allowed_scripts_for_private_opac = qw( |
799 |
opac-memberentry.tt |
800 |
opac-registration-email-sent.tt |
801 |
opac-registration-confirmation.tt |
802 |
opac-memberentry-update-submitted.tt |
803 |
opac-password-recovery.tt |
804 |
); |
805 |
$authnotrequired = 0 unless grep { $_ eq $template_name } |
806 |
@allowed_scripts_for_private_opac; |
807 |
} |
808 |
|
795 |
my $dbh = C4::Context->dbh; |
809 |
my $dbh = C4::Context->dbh; |
796 |
my $timeout = _timeout_syspref(); |
810 |
my $timeout = _timeout_syspref(); |
797 |
|
811 |
|
Lines 1247-1254
sub checkauth {
Link Here
|
1247 |
$LibraryNameTitle =~ s/<(?:\/?)(?:br|p)\s*(?:\/?)>/ /sgi; |
1261 |
$LibraryNameTitle =~ s/<(?:\/?)(?:br|p)\s*(?:\/?)>/ /sgi; |
1248 |
$LibraryNameTitle =~ s/<(?:[^<>'"]|'(?:[^']*)'|"(?:[^"]*)")*>//sg; |
1262 |
$LibraryNameTitle =~ s/<(?:[^<>'"]|'(?:[^']*)'|"(?:[^"]*)")*>//sg; |
1249 |
|
1263 |
|
1250 |
my $template_name = ( $type eq 'opac' ) ? 'opac-auth.tt' : 'auth.tt'; |
1264 |
my $auth_template_name = ( $type eq 'opac' ) ? 'opac-auth.tt' : 'auth.tt'; |
1251 |
my $template = C4::Templates::gettemplate( $template_name, $type, $query ); |
1265 |
my $template = C4::Templates::gettemplate( $auth_template_name, $type, $query ); |
1252 |
$template->param( |
1266 |
$template->param( |
1253 |
login => 1, |
1267 |
login => 1, |
1254 |
INPUTS => \@inputs, |
1268 |
INPUTS => \@inputs, |
1255 |
- |
|
|