View | Details | Raw Unified | Return to bug 24663
Collapse All | Expand All

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

Return to bug 24663