Bug 23823: Allow system preferences to be bookmarked
[koha.git] / tools / ajax-inventory.pl
blob72175cfb7a5a61b71976bbe5e35d0ccdfe51e040
1 #!/usr/bin/perl
3 use Modern::Perl;
4 use CGI qw ( -utf8 );
5 use C4::Auth;
6 use C4::Items qw( ModDateLastSeen );
8 my $input = CGI->new;
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');