Bug 14119: Missing de-DE DISCHARGE message
[koha.git] / authorities / merge_ajax.pl
blob458b4c953d45178b2d13cdc8ba74f57f9622f69c
1 #!/usr/bin/perl
3 use strict;
4 use warnings;
6 use CGI qw ( -utf8 );
7 use CGI::Session;
8 use C4::Context;
9 use C4::Auth qw/check_cookie_auth/;
10 use C4::AuthoritiesMarc;
11 use JSON;
12 use CGI::Cookie; # need to check cookies before
13 # having CGI parse the POST request
15 my %cookies = fetch CGI::Cookie;
16 my ($auth_status, $sessionID) = check_cookie_auth($cookies{'CGISESSID'}->value, { editcatalogue => 'edit_catalogue' });
17 if ($auth_status ne "ok") {
18 my $reply = CGI->new("");
19 print $reply->header(-type => 'text/html');
20 exit 0;
23 my $reply = new CGI;
24 my $framework = $reply->param('frameworkcode');
25 my $tagslib = GetTagsLabels(1, $framework);
26 print $reply->header(-type => 'text/html');
27 print encode_json $tagslib;