use C4::Output;
use C4::Reserves qw( ModReserve ModReserveCancelAll );
-use C4::Auth qw( get_template_and_user );
-use Koha::DateUtils qw( dt_from_string );
+use C4::Auth qw( checkauth );
use Koha::BackgroundJob::BatchUpdateBiblioHoldsQueue;
my $query = CGI->new;
-my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
- {
- template_name => "about.tt",
- query => $query,
- type => "intranet",
- flagsrequired => { reserveforothers => [ 'place_holds', 'modify_holds_priority' ] },
- }
-);
+
+checkauth($query, 0, { reserveforothers => '*' }, 'intranet');
my @reserve_id = $query->multi_param('reserve_id');
my @rank = $query->multi_param('rank-request');
my $params = {
rank => $rank[$i],
reserve_id => $reserve_id[$i],
- expirationdate => $expirationdates[$i] ? dt_from_string($expirationdates[$i]) : undef,
+ expirationdate => $expirationdates[$i] || undef,
branchcode => $branch[$i],
itemnumber => $itemnumber[$i],
defined $suspend_until ? ( suspend_until => $suspend_until ) : (),
cancellation_reason => $cancellation_reason,
};
if (C4::Context->preference('AllowHoldDateInFuture')) {
- $params->{reservedate} = $reservedates[$i] ? dt_from_string($reservedates[$i]) : undef;
+ $params->{reservedate} = $reservedates[$i] || undef;
}
try {