|
Lines 164-170
sub get_template_and_user {
Link Here
|
| 164 |
$in->{'query'}, |
164 |
$in->{'query'}, |
| 165 |
$in->{'authnotrequired'}, |
165 |
$in->{'authnotrequired'}, |
| 166 |
$in->{'flagsrequired'}, |
166 |
$in->{'flagsrequired'}, |
| 167 |
$in->{'type'} |
167 |
$in->{'type'}, |
|
|
168 |
undef, |
| 169 |
$in->{template_name}, |
| 168 |
); |
170 |
); |
| 169 |
} |
171 |
} |
| 170 |
|
172 |
|
|
Lines 787-795
sub checkauth {
Link Here
|
| 787 |
my $flagsrequired = shift; |
789 |
my $flagsrequired = shift; |
| 788 |
my $type = shift; |
790 |
my $type = shift; |
| 789 |
my $emailaddress = shift; |
791 |
my $emailaddress = shift; |
|
|
792 |
my $template_name = shift; |
| 790 |
$type = 'opac' unless $type; |
793 |
$type = 'opac' unless $type; |
| 791 |
|
794 |
|
| 792 |
$authnotrequired = 0 unless C4::Context->preference("OpacPublic"); |
795 |
unless ( C4::Context->preference("OpacPublic") ) { |
|
|
796 |
my @allowed_scripts_for_private_opac = qw( |
| 797 |
opac-memberentry.tt |
| 798 |
opac-registration-email-sent.tt |
| 799 |
opac-registration-confirmation.tt |
| 800 |
opac-memberentry-update-submitted.tt |
| 801 |
opac-password-recovery.tt |
| 802 |
); |
| 803 |
$authnotrequired = 0 unless grep { $_ eq $template_name } |
| 804 |
@allowed_scripts_for_private_opac; |
| 805 |
} |
| 806 |
|
| 793 |
my $dbh = C4::Context->dbh; |
807 |
my $dbh = C4::Context->dbh; |
| 794 |
my $timeout = _timeout_syspref(); |
808 |
my $timeout = _timeout_syspref(); |
| 795 |
|
809 |
|
|
Lines 1242-1249
sub checkauth {
Link Here
|
| 1242 |
$LibraryNameTitle =~ s/<(?:\/?)(?:br|p)\s*(?:\/?)>/ /sgi; |
1256 |
$LibraryNameTitle =~ s/<(?:\/?)(?:br|p)\s*(?:\/?)>/ /sgi; |
| 1243 |
$LibraryNameTitle =~ s/<(?:[^<>'"]|'(?:[^']*)'|"(?:[^"]*)")*>//sg; |
1257 |
$LibraryNameTitle =~ s/<(?:[^<>'"]|'(?:[^']*)'|"(?:[^"]*)")*>//sg; |
| 1244 |
|
1258 |
|
| 1245 |
my $template_name = ( $type eq 'opac' ) ? 'opac-auth.tt' : 'auth.tt'; |
1259 |
my $auth_template_name = ( $type eq 'opac' ) ? 'opac-auth.tt' : 'auth.tt'; |
| 1246 |
my $template = C4::Templates::gettemplate( $template_name, $type, $query ); |
1260 |
my $template = C4::Templates::gettemplate( $auth_template_name, $type, $query ); |
| 1247 |
$template->param( |
1261 |
$template->param( |
| 1248 |
login => 1, |
1262 |
login => 1, |
| 1249 |
INPUTS => \@inputs, |
1263 |
INPUTS => \@inputs, |
| 1250 |
- |
|
|