Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

executable file 32 lines (23 sloc) 0.66 kB
#!/usr/bin/env perl
use Koha;
use CGI;
use C4::Auth;
use C4::Items qw();
my $query = CGI->new;
my ($template, $agent_id, $cookie) = get_template_and_user(
{
template_name => 'catalogue/detail.tmpl',
query => $query,
type => 'intranet',
authnotrequired => 0,
flagsrequired => { borrow => '*' },
}
);
my $itemnumber = $query->param('itemnumber');
my $item = C4::Items::GetItem($itemnumber);
my $agent = C4::Members::GetMember($agent_id);
die if (!$item || !$agent);
C4::Items::PassOnOffer($agent, $item);
my $target = $ENV{HTTP_REFERER};
print $query->redirect($target);
exit;
Jump to Line
Something went wrong with that request. Please try again.