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 ); |