Koha/tools/ajax-inventory.pl
Jonathan Druart e20270fec4 Bug 11944: use CGI( -utf8 ) everywhere
Signed-off-by: Paola Rossi <paola.rossi@cineca.it>
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Signed-off-by: Dobrica Pavlinusic <dpavlin@rot13.org>

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-01-13 13:07:21 -03:00

23 lines
517 B
Perl
Executable file

#!/usr/bin/perl
use Modern::Perl;
use CGI qw ( -utf8 );
use C4::Auth;
use C4::Items qw( ModDateLastSeen );
my $input = new CGI;
# Authentication
my ($status, $cookie, $sessionId) = C4::Auth::check_api_auth($input, { tools => 'inventory' });
exit unless ($status eq "ok");
my $seen = $input->param('seen');
my @seent = split(/\|/, $seen);
# mark seen if applicable (ie: coming form mark seen checkboxes)
foreach ( @seent ) {
/SEEN-(.+)/ and &ModDateLastSeen($1);
}
print $input->header('application/json');