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

(-)a/Koha/ILL/Backend/Standard.pm (-20 / +2 lines)
Lines 24-29 use C4::Installer; Link Here
24
24
25
use Koha::DateUtils qw/ dt_from_string /;
25
use Koha::DateUtils qw/ dt_from_string /;
26
use Koha::I18N      qw(__);
26
use Koha::I18N      qw(__);
27
use Koha::ILL::Request;
27
use Koha::ILL::Requests;
28
use Koha::ILL::Requests;
28
use Koha::ILL::Request::Attribute;
29
use Koha::ILL::Request::Attribute;
29
use C4::Biblio  qw( AddBiblio );
30
use C4::Biblio  qw( AddBiblio );
Lines 292-298 sub create { Link Here
292
            C4::Context->preference("ILLOpacUnauthenticatedRequest") && !$other->{'cardnumber'};
293
            C4::Context->preference("ILLOpacUnauthenticatedRequest") && !$other->{'cardnumber'};
293
        if ($unauthenticated_request) {
294
        if ($unauthenticated_request) {
294
            ( $failed, $result ) = _validate_form_params( $other, $result, $params );
295
            ( $failed, $result ) = _validate_form_params( $other, $result, $params );
295
            if ( !_unauth_request_data_check($other) ) {
296
            if ( !Koha::ILL::Request::unauth_request_data_check($other) ) {
296
                $result->{status} = "missing_unauth_data";
297
                $result->{status} = "missing_unauth_data";
297
                $result->{value}  = $params;
298
                $result->{value}  = $params;
298
                $failed           = 1;
299
                $failed           = 1;
Lines 1228-1252 sub _set_suppression { Link Here
1228
    return 1;
1229
    return 1;
1229
}
1230
}
1230
1231
1231
=head3 _unauth_request_data_check
1232
1233
    _unauth_request_data_check($other);
1234
1235
Checks if unauthenticated request data is present
1236
1237
=cut
1238
1239
sub _unauth_request_data_check {
1240
    my ($other) = @_;
1241
1242
    return 1 unless C4::Context->preference("ILLOpacUnauthenticatedRequest");
1243
1244
    return
1245
           $other->{unauthenticated_first_name}
1246
        && $other->{unauthenticated_last_name}
1247
        && $other->{unauthenticated_email};
1248
}
1249
1250
=head3 _validate_form_params
1232
=head3 _validate_form_params
1251
1233
1252
    _validate_form_params( $other, $result, $params );
1234
    _validate_form_params( $other, $result, $params );
(-)a/Koha/ILL/Request.pm (-1 / +19 lines)
Lines 1959-1964 sub append_unauthenticated_notes { Link Here
1959
    $self->notesopac($unauthenticated_notes_text)->store;
1959
    $self->notesopac($unauthenticated_notes_text)->store;
1960
}
1960
}
1961
1961
1962
=head3 unauth_request_data_check
1963
1964
    unauth_request_data_check($metadata);
1965
1966
Checks if unauthenticated request data is present
1967
1968
=cut
1969
1970
sub unauth_request_data_check {
1971
    my ($metadata) = @_;
1972
1973
    return 1 unless C4::Context->preference("ILLOpacUnauthenticatedRequest");
1974
1975
    return
1976
           $metadata->{unauthenticated_first_name}
1977
        && $metadata->{unauthenticated_last_name}
1978
        && $metadata->{unauthenticated_email};
1979
}
1980
1962
=head3 append_to_note
1981
=head3 append_to_note
1963
1982
1964
    append_to_note("Some text");
1983
    append_to_note("Some text");
1965
- 

Return to bug 36197