Bug 5962 : Budgets showing when they shouldn't (MT #4717) Bug in Koha 3.2 on acqui...
[koha.git] / cataloguing / merge_ajax.pl
blob6bad3e91d2ca751e27c85f87432aa3630d2d7866
1 #!/usr/bin/perl
3 use strict;
4 #use warnings; FIXME - Bug 2505
6 # standard or CPAN modules used
7 use IO::File;
8 use CGI;
9 use CGI::Session;
10 use C4::Context;
11 use C4::Biblio;
12 use C4::Auth qw/check_cookie_auth/;
13 use C4::UploadedFile;
14 use JSON;
15 use CGI::Cookie; # need to check cookies before
16 # having CGI parse the POST request
18 my %cookies = fetch CGI::Cookie;
19 my ($auth_status, $sessionID) = check_cookie_auth($cookies{'CGISESSID'}->value, { editcatalogue => '1' });
20 if ($auth_status ne "ok") {
21 my $reply = CGI->new("");
22 print $reply->header(-type => 'text/html');
23 exit 0;
26 my $reply = new CGI;
27 my $framework = $reply->param('frameworkcode');
28 my $tagslib = GetMarcStructure(1, $framework);
29 print $reply->header(-type => 'text/html');
30 print encode_json $tagslib;