Bug 11944: replace use of utf8 with Encode
[koha.git] / authorities / merge_ajax.pl
blobdd716a72b39f059692061fce8641cc5ea237c8c0
1 #!/usr/bin/perl
3 use strict;
4 use warnings;
6 use CGI;
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;