Bug 13321 - DBRev 16.06.00.042
[koha.git] / cataloguing / merge_ajax.pl
blobaef7dcbfb9010cb914a010933e17f6e85515b9c9
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::Biblio;
11 use C4::Auth qw/check_cookie_auth/;
13 my %cookies = CGI::Cookie->fetch;
14 my ( $auth_status, $sessionID ) = check_cookie_auth(
15 $cookies{'CGISESSID'}->value, { editcatalogue => 'edit_catalogue' },
17 my $reply = CGI->new;
18 if ($auth_status ne "ok") {
19 print $reply->header(-type => 'text/html');
20 exit 0;
23 my $framework = $reply->param('frameworkcode');
24 my $tagslib = GetMarcStructure(1, $framework);
25 print $reply->header(-type => 'text/html');
26 print encode_json $tagslib;