Bug 13436: DBRev 3.19.00.001
[koha.git] / tools / ajax-inventory.pl
blob63f371a936b915a62ba0102c70c766ab1b83232b
1 #!/usr/bin/perl
3 use Modern::Perl;
4 use CGI;
5 use C4::Auth;
6 use C4::Items qw( ModDateLastSeen );
8 my $input = new CGI;
10 # Authentication
11 my ($status, $cookie, $sessionId) = C4::Auth::check_api_auth($input, { tools => 'inventory' });
12 exit unless ($status eq "ok");
15 my $seen = $input->param('seen');
16 my @seent = split(/\|/, $seen);
18 # mark seen if applicable (ie: coming form mark seen checkboxes)
19 foreach ( @seent ) {
20 /SEEN-(.+)/ and &ModDateLastSeen($1);
23 print $input->header('application/json');