Bug 22330: Cache item and library objects when building the holds queue
[koha.git] / authorities / merge_ajax.pl
blob6ed427891c28c6e954f0757d0a492519f9b70ef6
1 #!/usr/bin/perl
3 use Modern::Perl;
5 use CGI qw ( -utf8 );
6 use CGI::Cookie; # need to check cookies before CGI parses the POST request
7 use JSON;
9 use C4::Context;
10 use C4::Auth qw/check_cookie_auth/;
11 use C4::AuthoritiesMarc;
13 my %cookies = CGI::Cookie->fetch;
14 my ($auth_status, $sessionID) = check_cookie_auth($cookies{'CGISESSID'}->value, { editcatalogue => 'edit_catalogue' });
15 my $reply = CGI->new;
16 if ($auth_status ne "ok") {
17 print $reply->header(-type => 'text/html');
18 exit 0;
21 my $framework = $reply->param('frameworkcode');
22 my $tagslib = GetTagsLabels(1, $framework);
23 print $reply->header(-type => 'text/html');
24 print encode_json $tagslib;