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

(-)a/Koha/ILL/Request.pm (+24 lines)
Lines 2463-2468 sub can_patron_place_ill_in_opac { Link Here
2463
    return 1;
2463
    return 1;
2464
}
2464
}
2465
2465
2466
=head3 trim_form_params
2467
2468
    my $params = trim_form_params($params);
2469
2470
    Trims $params. Needed to ensure submitted data is not saved with leading or trailing white spaces:
2471
2472
    This:
2473
    {
2474
        'doi' => ' 123',
2475
    };
2476
2477
    Becomes:
2478
    {
2479
        'doi' => '123',
2480
    };
2481
2482
=cut
2483
2484
sub trim_form_params {
2485
    my ( $self, $params ) = @_;
2486
2487
    return { map { $_ => $params->{$_} =~ s/^\s+|\s+$//gr } keys %$params };
2488
}
2489
2466
=head3 get_history_check_requests
2490
=head3 get_history_check_requests
2467
2491
2468
    $self->get_history_check_requests();
2492
    $self->get_history_check_requests();
(-)a/ill/ill-requests.pl (-1 / +1 lines)
Lines 132-137 if ($backends_available) { Link Here
132
132
133
        # Load the ILL backend
133
        # Load the ILL backend
134
        my $request = Koha::ILL::Request->new->load_backend( $params->{backend} );
134
        my $request = Koha::ILL::Request->new->load_backend( $params->{backend} );
135
        $params = $request->trim_form_params($params);
135
136
136
        # Before request creation operations - Preparation
137
        # Before request creation operations - Preparation
137
        my $history_check   = Koha::ILL::Request::Workflow::HistoryCheck->new( $params, 'staff' );
138
        my $history_check   = Koha::ILL::Request::Workflow::HistoryCheck->new( $params, 'staff' );
138
- 

Return to bug 39944