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 790-798 sub checkauth { Link Here
790
    my $flagsrequired   = shift;
792
    my $flagsrequired   = shift;
791
    my $type            = shift;
793
    my $type            = shift;
792
    my $emailaddress    = shift;
794
    my $emailaddress    = shift;
795
    my $template_name   = shift;
793
    $type = 'opac' unless $type;
796
    $type = 'opac' unless $type;
794
797
795
    $authnotrequired = 0 unless C4::Context->preference("OpacPublic");
798
    unless ( C4::Context->preference("OpacPublic") ) {
799
        my @allowed_scripts_for_private_opac = qw(
800
          opac-memberentry.tt
801
          opac-registration-email-sent.tt
802
          opac-registration-confirmation.tt
803
          opac-memberentry-update-submitted.tt
804
          opac-password-recovery.tt
805
        );
806
        $authnotrequired = 0 unless grep { $_ eq $template_name }
807
          @allowed_scripts_for_private_opac;
808
    }
809
796
    my $dbh     = C4::Context->dbh;
810
    my $dbh     = C4::Context->dbh;
797
    my $timeout = _timeout_syspref();
811
    my $timeout = _timeout_syspref();
798
812
Lines 1244-1251 sub checkauth { Link Here
1244
    $LibraryNameTitle =~ s/<(?:\/?)(?:br|p)\s*(?:\/?)>/ /sgi;
1258
    $LibraryNameTitle =~ s/<(?:\/?)(?:br|p)\s*(?:\/?)>/ /sgi;
1245
    $LibraryNameTitle =~ s/<(?:[^<>'"]|'(?:[^']*)'|"(?:[^"]*)")*>//sg;
1259
    $LibraryNameTitle =~ s/<(?:[^<>'"]|'(?:[^']*)'|"(?:[^"]*)")*>//sg;
1246
1260
1247
    my $template_name = ( $type eq 'opac' ) ? 'opac-auth.tt' : 'auth.tt';
1261
    my $auth_template_name = ( $type eq 'opac' ) ? 'opac-auth.tt' : 'auth.tt';
1248
    my $template = C4::Templates::gettemplate( $template_name, $type, $query );
1262
    my $template = C4::Templates::gettemplate( $auth_template_name, $type, $query );
1249
    $template->param(
1263
    $template->param(
1250
        login                                 => 1,
1264
        login                                 => 1,
1251
        INPUTS                                => \@inputs,
1265
        INPUTS                                => \@inputs,
1252
- 

Return to bug 24663