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